Counting elements in xsl
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 6
- Joined: Sun Mar 27, 2005 10:29 pm
Counting elements in xsl
Hi all,
I would like to know if there is any method for counting the number of times a particular element occurs in a xml program using a xsl stylesheet.
This is the code which i have
I need to find the number of artists in the xml code(which is 2)
thanx
I would like to know if there is any method for counting the number of times a particular element occurs in a xml program using a xsl stylesheet.
This is the code which i have
Code: Select all
<dict>
<key>35</key>
<dict>
<key>Track ID</key><integer>35</integer>
<key>Name</key><string>Chiquita</string>
<key>Artist</key><string>ABBA</string>
<key>Album</key><string>Gold</string>
<key>Genre</key><string>Pop</string>
<key>Kind</key><string>MPEG audio file</string>
<key>Size</key><integer>6528577</integer>
<key>Total Time</key><integer>326321</integer>
<key>Track Number</key><integer>11</integer>
<key>Track Count</key><integer>19</integer>
<key>Date Modified</key><date>2001-11-12T14:57:17Z</date>
<key>Date Added</key><date>2002-10-18T12:31:08Z</date>
<key>Bit Rate</key><integer>160</integer>
<key>Sample Rate</key><integer>44100</integer>
<key>Play Count</key><integer>3</integer>
<key>Play Date</key><integer>-1148223841</integer>
<key>Play Date UTC</key><date>2003-09-18T19:24:15Z</date>
<key>Track Type</key><string>File</string>
<key>File Type</key><integer>1297106739</integer>
<key>File Creator</key><integer>1752133483</integer>
<key>Location</key><string>file://localhost/Volumes/Portable/Music/iTunes/iTunes%20Music/ABBA/Gold/Chiquita.mp3</string>
<key>File Folder Count</key><integer>-1</integer>
<key>Library Folder Count</key><integer>-1</integer>
</dict>
<key>36</key>
<dict>
<key>Track ID</key><integer>36</integer>
<key>Name</key><string>Dancing Queen</string>
<key>Artist</key><string>ABBA</string>
<key>Album</key><string>Gold</string>
<key>Genre</key><string>Pop</string>
<key>Kind</key><string>MPEG audio file</string>
<key>Size</key><integer>4647242</integer>
<key>Total Time</key><integer>232254</integer>
<key>Track Number</key><integer>1</integer>
<key>Track Count</key><integer>19</integer>
<key>Date Modified</key><date>2001-11-12T14:41:25Z</date>
<key>Date Added</key><date>2002-10-18T12:31:08Z</date>
<key>Bit Rate</key><integer>160</integer>
<key>Sample Rate</key><integer>44100</integer>
<key>Play Count</key><integer>3</integer>
<key>Play Date</key><integer>-1148226321</integer>
<key>Play Date UTC</key><date>2003-09-18T18:42:55Z</date>
<key>Track Type</key><string>File</string>
<key>File Type</key><integer>1297106739</integer>
<key>File Creator</key><integer>1752133483</integer>
<key>Location</key><string>file://localhost/Volumes/Portable/Music/iTunes/iTunes%20Music/ABBA/Gold/Dancing%20Queen.mp3</string>
<key>File Folder Count</key><integer>-1</integer>
<key>Library Folder Count</key><integer>-1</integer>
</dict>
thanx
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service