|
The popular online bookstore Amazon has details of many thousands of music albums. Their page devoted to "The Very Best of Elvis Costello and the Attractions" may be found at using the unique identifier: B00005ARFU. Sadly this html will not be processed by xalan because it is not well formed. Happily we can clean it up by doing a little pre-processing and running it through Dave Raggett's tidy. The result of this tidying can be found in a number of formats: original or as text or as xml and as clean xhtml We wish to extract various details about this (or indeed any) album:
|
|
Use xsl to create an XML file that contains details about any album. It should have a structure like: <?xml version="1.0" encoding="UTF-8"?> <cd> <album>Sgt. Pepper's Lonely Hearts Club Band</album> <artist>The Beatles</artist> <price>$13.49</price> <date>: June 1, 1967</date> <label> Capitol</label> <asin> B000002UAU</asin> <rank> 183</rank> <track>1. Sgt. Pepper's Lonely Hearts Club Band</track> <track>2. With a Little Help from My Friends</track> <track>3. Lucy in the Sky With Diamonds</track> <track>4. Getting Better</track> <track>5. Fixing a Hole</track> <track>6. She's Leaving Home</track> <track>7. Being for the Benefit of Mr. Kite</track> <track>8. Within You, Without You</track> <track>9. When I'm Sixty-Four</track> <track>10. Lovely Rita</track> <track>11. Good Morning, Good Morning</track> <track>12. Sgt. Pepper's Lonely Hearts Club Band (Reprise)</track> <track>13. Day in the Life</track> <style>Styles > Classic Rock > British Invasion</style> <style>Styles > Classic Rock > Supergroups</style> <style>Styles > Classic Rock > General</style> <style>Styles > Classic Rock > Psychedelic Rock</style> <cd> Notes: It may help if you turn off "show as text" |