M
Martin
Hello
I'm trying to learn xlink/xpointer (with no success so far :-(
I would like to produce the following output.
AAAA
BBBB
CCCC
AAAA
BBBB
DDDD
In the xlst I have tried changing the xsl:for-each to see if
I could figure out how to address the <test><Common><Param>
With no success.
Maybe the xlink I have done is wrong, or even what I like
to achieve is not possible at all.
The xml file I have is like this.
<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet type="text/xsl" href="testxlink.xslt"?>
<test xmlns:xlink="http://www.w3.org/1999/xlink">
<Common id="pre">
<Param>AAAA</Param>
<Param>BBBB</Param>
</Common>
<Element>
<common xlink:type="simple" xlink:href="#pre"/>
<Param>CCCC</Param>
</Element>
<Element>
<common xlink:type="simple" xlink:href="#pre"/>
<Param>DDDD</Param>
</Element>
</test>
The xslt
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:for-each select="test/Element">
<xsl:for-each select="Param">
<xsl:value-of select="."/>
</xsl:for-each>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
I'm trying to learn xlink/xpointer (with no success so far :-(
I would like to produce the following output.
AAAA
BBBB
CCCC
AAAA
BBBB
DDDD
In the xlst I have tried changing the xsl:for-each to see if
I could figure out how to address the <test><Common><Param>
With no success.
Maybe the xlink I have done is wrong, or even what I like
to achieve is not possible at all.
The xml file I have is like this.
<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet type="text/xsl" href="testxlink.xslt"?>
<test xmlns:xlink="http://www.w3.org/1999/xlink">
<Common id="pre">
<Param>AAAA</Param>
<Param>BBBB</Param>
</Common>
<Element>
<common xlink:type="simple" xlink:href="#pre"/>
<Param>CCCC</Param>
</Element>
<Element>
<common xlink:type="simple" xlink:href="#pre"/>
<Param>DDDD</Param>
</Element>
</test>
The xslt
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:for-each select="test/Element">
<xsl:for-each select="Param">
<xsl:value-of select="."/>
</xsl:for-each>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>