T
Toney
Definitely welcome any assistance.
Inherited some code with an xml structure I don't think is the best. In the
short term I have to live with what's there.
Everything appears correctly until you mouse over the link and get a
concantenation of all data elements, e.g.
http://www.anydomain.com?key=1234keyimage1234.jsp09/12/2005. The data is
located within the datagram of the parent element which also has child
elements. With the stylesheet how do I separate out the link information
and strip the rest? I'm sure it must be a simple solution and my brain is
just on lock down.
Example xml:
<?xml version="1.0" encoding="UTF-8"?>
<images>
<image>
http://www.anydomain.com?key=1234
<image-filename>keyimage1234.jsp</image-filename>
<image-lastmodified>09/12/2005</image-lastmodified>
</image>
<image>
http://www.anydomain.com?key=3456
<image-filename>keyimage3456.jsp</image-filename>
<image-lastmodified>09/22/2005</image-lastmodified>
</image>
<image>
http://www.anydomain.com?key=7898
<image-filename>keyimage7898.jsp</image-filename>
<image-lastmodified>09/31/2005</image-lastmodified>
</image>
</images>
Example xslt:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="image">
<a href="{.}"><xsl:value-of select="image-filename"/></a> (last modified:
<xsl:value-of select="image-lastmodified" />)<br/><br/>
</xsl:template>
</xsl:stylesheet>
Example results:
keyimage1234.jsp (last modified: 09/12/2005)
keyimage3456.jsp (last modified: 09/22/2005)
keyimage7898.jsp (last modified: 09/31/2005)
Inherited some code with an xml structure I don't think is the best. In the
short term I have to live with what's there.
Everything appears correctly until you mouse over the link and get a
concantenation of all data elements, e.g.
http://www.anydomain.com?key=1234keyimage1234.jsp09/12/2005. The data is
located within the datagram of the parent element which also has child
elements. With the stylesheet how do I separate out the link information
and strip the rest? I'm sure it must be a simple solution and my brain is
just on lock down.
Example xml:
<?xml version="1.0" encoding="UTF-8"?>
<images>
<image>
http://www.anydomain.com?key=1234
<image-filename>keyimage1234.jsp</image-filename>
<image-lastmodified>09/12/2005</image-lastmodified>
</image>
<image>
http://www.anydomain.com?key=3456
<image-filename>keyimage3456.jsp</image-filename>
<image-lastmodified>09/22/2005</image-lastmodified>
</image>
<image>
http://www.anydomain.com?key=7898
<image-filename>keyimage7898.jsp</image-filename>
<image-lastmodified>09/31/2005</image-lastmodified>
</image>
</images>
Example xslt:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="image">
<a href="{.}"><xsl:value-of select="image-filename"/></a> (last modified:
<xsl:value-of select="image-lastmodified" />)<br/><br/>
</xsl:template>
</xsl:stylesheet>
Example results:
keyimage1234.jsp (last modified: 09/12/2005)
keyimage3456.jsp (last modified: 09/22/2005)
keyimage7898.jsp (last modified: 09/31/2005)