Altova Mailing List Archives


Newbie ..XSLT transformation help!!

From: "asasd" <ASDsad>
To: NULL
Date: 3/18/2005 12:20:00 PM
Hi i am new at XML, and XSLT...

I have this file: below, I am only trying to get the name and artist, not
the track id ...however when i try and transform it, i get all of it...I
haven't been able to figure out how to get just the name and artist. xml,
and xslt below.

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="test.xsl"?>
<dict>
<key>Tracks</key>
<dict>
<key>35</key>
<dict>
<key>Track ID</key><integer>35</integer>
<key>Name</key><string>Lady Marmalade</string>
<key>Artist</key><string>Moulin Rouge</string>
<key>Date</key><string>3/3/05</string>
</dict>
<key>36</key>
<dict>
<key>Track ID</key><integer>36</integer>
<key>Name</key><string>Shook Me All Night Long</string>
<key>Artist</key><string>AC/DC</string>
<key>Date</key><string>3/3/05</string>
</dict>
</dict>
</dict>

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:for-each select="dict " >
<xsl:value-of select="dict" />
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>


any help would be appricated!!! thanks


Disclaimer

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.