D
Donald Firesmith
How do I use XSL to generate and XHTML list of hyperlinks stored in XML?
My XML contains links of examples of the form:
<examples>
<example>
<link url="aURL">some text</link>
<info>some more text</info>
</example>
<example>
<link url="aURL">some text</link>
<info>some more text</info>
</example>
</examples>
My XSL looks like this:
<ul>
<xsl:for-each select="examples/example">
<li><a href="<xsl:value-of select="@url"/>">
<xsl:value-of select="." disable-output-escaping="yes"/>
<xsl:value-of select="info"/>
</a></li>
</xsl:for-each>
</ul>
I can't seem to get this to work. The url parameter won't fit in the
link. Can anyone show me the proper XSL code for this? Also what
should the XSL code look like if info is optional?
Thanks.
Don
My XML contains links of examples of the form:
<examples>
<example>
<link url="aURL">some text</link>
<info>some more text</info>
</example>
<example>
<link url="aURL">some text</link>
<info>some more text</info>
</example>
</examples>
My XSL looks like this:
<ul>
<xsl:for-each select="examples/example">
<li><a href="<xsl:value-of select="@url"/>">
<xsl:value-of select="." disable-output-escaping="yes"/>
<xsl:value-of select="info"/>
</a></li>
</xsl:for-each>
</ul>
I can't seem to get this to work. The url parameter won't fit in the
link. Can anyone show me the proper XSL code for this? Also what
should the XSL code look like if info is optional?
Thanks.
Don