|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Transposing matrices
Hi all,
I amy trying to wite a stylesheet that will transpose matrices
written in the following format:
<matrix>
<row>
<item>xxx</item><item>yyy</item> ...
</row>
<row>
..
</row
.. more rows ... here
</matrix>
The stylesheet I have come up with so far (thanks to a very old
message at this forum actually) is:
<xsl:template match="//matrix">
<matrix>
<xsl:for-each select="//row[1]/item">
<xsl:variable name="i" select="position()"/>
<row>
<xsl:for-each select="//row">
<item><xsl:value-of select="item[$i]"/></item>
</xsl:for-each>
</row>
</xsl:for-each>
</matrix>
</xsl:template>
This does work perfectly if the items contain "normal data". The
stylesheet must however work as well with items that may contain
A
MATRIX!
I know the way the matrices are selected should be modified but I
can't figure out how.
Could anyone please help?
Many thanks in advance,
Nickolay Kolev
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








