473,396 Members | 1,879 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

[xsl] pleaz help

I have xsl code like this:

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:page="http://www.wolterinkwebdesign.com/xml/page"
xmlns:xc="http://www.wolterinkwebdesign.com/xml/xcontent">

<xsl:include href="xsl/xhtml/standard.xsl"/>
<xsl:include href="xsl/xhtml/collectielib.xsl"/>

<!-- the file collectielib.xsl defines templates for xc:fauteuil elements -->

<xsl:output method="xml" indent="yes"/>

<xsl:param name="absolute_url"/>
<xsl:param name="upload_url"/>
<xsl:param name="cols" select="3"/>

<xsl:template match="/xc:xcontent">
<page:page type="module">
<page:section>
<page:content>
<h2>Fauteuils</h2>
<center>
<table class="collectie">
<xsl:for-each select="./xc:fauteuil[(position() mod $cols)=1]">
<xsl:sort data-type="text" select="xc:naam" order="descending"
/>
<tr>
<xsl:apply-templates select="."/>
<xsl:apply-templates
select="following-sibling::xc:fauteuil[position() &lt; $cols]"/>
</tr>
</xsl:for-each>
</table>
</center>

</page:content>
</page:section>
</page:page>
</xsl:template>
</xsl:stylesheet>

But with an XML input like this:
----------
<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE xc:xcontent [
<!ENTITY % xhtml PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"schema/xhtml/xhtml1-strict.dtd">%xhtml;]>

<xc:xcontent xmlns:xc="http://www.wolterinkwebdesign.com/xml/xcontent"
xmlns="http://www.w3.org/1999/xhtml" module="collectie">
<xc:content type="html">
<xc:empty/>
</xc:content>
<xc:fauteuil>
<xc:id>1</xc:id>
<xc:naam type="string"><![CDATA[test]]></xc:naam>
<xc:afmetingen type="string"><![CDATA[test]]></xc:afmetingen>
<xc:foto type="img" width="2592" height="1944"><![CDATA[Rutger
faut1.JPG]]></xc:foto>
<xc:content type="html">
etet
</xc:content>
</xc:fauteuil>
<xc:fauteuil>
<xc:id>2</xc:id>
<xc:naam type="string"><![CDATA[rutger]]></xc:naam>
<xc:afmetingen type="string"><![CDATA[rutger]]></xc:afmetingen>
<xc:foto type="img" width="2592" height="1944"><![CDATA[Rutger
faut2.JPG]]></xc:foto>
<xc:content type="html">
rr
</xc:content>
</xc:fauteuil>
<xc:fauteuil>
<xc:id>3</xc:id>
<xc:naam type="string"><![CDATA[rutger]]></xc:naam>
<xc:afmetingen type="string"><![CDATA[rutger]]></xc:afmetingen>
<xc:foto type="img" width="2592" height="1944"><![CDATA[Rutger
faut2.JPG]]></xc:foto>
<xc:content type="html">
rr
</xc:content>
</xc:fauteuil>
<xc:fauteuil>
<xc:id>4</xc:id>
<xc:naam type="string"><![CDATA[rutger]]></xc:naam>
<xc:afmetingen type="string"><![CDATA[rutger]]></xc:afmetingen>
<xc:foto type="img" width="2592" height="1944"><![CDATA[Rutger
faut2.JPG]]></xc:foto>
<xc:content type="html">
rr
</xc:content>
</xc:fauteuil>
<xc:fauteuil>
<xc:id>5</xc:id>
<xc:naam type="string"><![CDATA[rutger]]></xc:naam>
<xc:afmetingen type="string"><![CDATA[rutger]]></xc:afmetingen>
<xc:foto type="img" width="2592" height="1944"><![CDATA[Rutger
faut2.JPG]]></xc:foto>
<xc:content type="html">
rr
</xc:content>
</xc:fauteuil>
<xc:fauteuil>
<xc:id>6</xc:id>
<xc:naam type="string"><![CDATA[rutger]]></xc:naam>
<xc:afmetingen type="string"><![CDATA[rutger]]></xc:afmetingen>
<xc:foto type="img" width="2592" height="1944"><![CDATA[Rutger
faut2.JPG]]></xc:foto>
<xc:content type="html">
rr
</xc:content>
</xc:fauteuil>
<xc:fauteuil>
<xc:id>7</xc:id>
<xc:naam type="string"><![CDATA[rutger]]></xc:naam>
<xc:afmetingen type="string"><![CDATA[rutger]]></xc:afmetingen>
<xc:foto type="img" width="2592" height="1944"><![CDATA[Rutger
faut2.JPG]]></xc:foto>
<xc:content type="html">
rr
</xc:content>
</xc:fauteuil>
</xc:xcontent>
----
now i want this to be sort of like this

<page:page type="module">
<page:section>
<page:content>
<h2>Fauteuils</h2>
<center>
<table class="collectie">
<tr>
- fauteuil1
- fauteuil2
- fauteuil3
</tr>
<tr>
- fauteuil4
- fauteuil5
- fauteuil6
</tr>
<tr>
- fauteuil7
</tr>
</xsl:for-each>
</table>
</center>

</page:content>
</page:section>
</page:page>


But the output is like this:
--

<page:page type="module">
<page:section>
<page:content>
<h2>Fauteuils</h2>
<center>
<table class="collectie">
<tr>
- fauteuil7
</tr>
<tr>
- fauteuil1
- fauteuil2
- fauteuil3
</tr>
<tr>
- fauteuil4
- fauteuil5
- fauteuil6
</tr>
</xsl:for-each>
</table>
</center>

</page:content>
</page:section>
</page:page>


----
i know i am asking much, but im stuck here.
Jul 20 '05 #1
0 876

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Michael Fork | last post by:
Note: I pasted the code the attachments as plain text after the message (I wasn't able to post it with an attachment...) Attached are the XSL and XML files that I am having problems with. I am...
3
by: will | last post by:
HOpe you can help with this... I have the following xml document... <?xml version="1.0" ?> <file> <header>some data</header> <detail> some more data</detail> <footer> gdshada </footer>
0
by: johkar | last post by:
My XML and XSL is below. Also below is a textual representation of what I want to get out of the XML with XSL. For each Extension node in XML, I am only concerned with those nodes with...
1
by: Philip | last post by:
Hi, I am trying to output certain nodes inside another. I have an xml template with field definitions for a form, and this includes textfields, labels, checkboxes etc plus fieldssets. I defined...
3
by: Tjerk Wolterink | last post by:
Hello i have xml code like this: <page:page xmlns:page="namespacefor page"> <page:section> <page:header> <b>Hello</b>There </page:header> <page:content> --- HTML CODE like: <i>Y</i>es i...
22
by: Rafia Tapia | last post by:
Hi all This is what I have in mind and I will appreciate any suggestions. I am trying to create a xml help system for my application. The schema of the xml file will be <helpsystem> <help...
1
by: sommarlov | last post by:
Hi everyone >From one of our systems an xml file is produced. I need to validate this file before we send it to an external system for a very lenghty process. I cannot change the xml file layout....
2
by: shapper | last post by:
Hello, I am for days trying to apply a XSL transformation to a XML file and display the result in a the browser. I am using Asp.Net 2.0. Please, could someone post just a simple code example,...
1
by: Candle | last post by:
I am having a problem with writing an XSL Transform. Please help. Note: I know this a long post but I wanted to provide as must detail as possible. Any help would be appreciated. (Just started...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.