Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet type="text/xsl" href="assignment5.xsl"?><bookstore> <book isbn="0321049314" year="2000" edition="6"> <name>Psychology</name> <description>Introductory level Pyschology course book</description> <courseapplicability> <course institute="BCIT">PSYC1101</course> </courseapplicability> <author firstname="Carole" lastname="Wade" /> <author firstname="Carol" lastname="Tavris" /> <publisher>Prentice Hall</publisher> <price currency="CAN">110.00</price> <stock> <category>Pschology</category> <copiesinstock>10</copiesinstock> <coverimage url="./images/psychology.jpg" /> <availability days="1" /> </stock> </book> <book isbn="0596001436" year="2001" edition="1"> <name>Java and XSLT</name> <description>Embedding XML Processing Into Java Applications</description> <courseapplicability> <course institute="BCIT">MMSD4670</course> </courseapplicability> <author firstname="Eric" lastname="Burke" /> <publisher>O&Reilly</publisher> <price currency="CAN">59.95</price> <price currency="US">39.95</price> <stock> <category>Programming</category> <subcategory>Java Programming</subcategory> <copiesinstock>2</copiesinstock> <coverimage url="./images/javaxml.gif" /> <availability days="2" /> </stock> </book> <book isbn="0130655678" year="2001" edition="1"> <name>Definitive XML Schema</name> <description>XML Schema Reference and Tutorial</description> <courseapplicability> <course institute="BCIT">MMSD4670</course> <course institute="BCIT">MMSD0410</course> <course institute="BCIT">MMSD4620</course> </courseapplicability> <author firstname="Priscilla" lastname="Walmsley" /> <publisher>Prentice Hall</publisher> <price currency="US">31.49</price> <stock> <category>Technology</category> <subcategory>XML Schema</subcategory> <copiesinstock>2</copiesinstock> <coverimage url="./images/xmlschema.gif" /> <availability days="4" /> </stock> </book></bookstore>
How do I transfer this to html? I just want to know the <coverimage url="./> part thanks.
I was trying <xsl:for-each select="."> <xsl:apply-templates select="stock/coverimage"/> </xsl:for-each> but this didn't work. Please help me thanks.
Hi WIlliam, it sounds more like a homework assignment, rather than an Umbraco-related question?
Best bet is to get a good understanding of how XSLT processes the XML document, W3Schools has an awesome section on it:
http://w3schools.com/xsl/default.asp
Good luck, Lee.
I still don't get it. If any one has an answer please tell me thanks.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Xslt style sheet
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="assignment5.xsl"?>
<bookstore>
<book isbn="0321049314" year="2000" edition="6">
<name>Psychology</name>
<description>Introductory level Pyschology course book</description>
<courseapplicability>
<course institute="BCIT">PSYC1101</course>
</courseapplicability>
<author firstname="Carole" lastname="Wade" />
<author firstname="Carol" lastname="Tavris" />
<publisher>Prentice Hall</publisher>
<price currency="CAN">110.00</price>
<stock>
<category>Pschology</category>
<copiesinstock>10</copiesinstock>
<coverimage url="./images/psychology.jpg" />
<availability days="1" />
</stock>
</book>
<book isbn="0596001436" year="2001" edition="1">
<name>Java and XSLT</name>
<description>Embedding XML Processing Into Java Applications</description>
<courseapplicability>
<course institute="BCIT">MMSD4670</course>
</courseapplicability>
<author firstname="Eric" lastname="Burke" />
<publisher>O&Reilly</publisher>
<price currency="CAN">59.95</price>
<price currency="US">39.95</price>
<stock>
<category>Programming</category>
<subcategory>Java Programming</subcategory>
<copiesinstock>2</copiesinstock>
<coverimage url="./images/javaxml.gif" />
<availability days="2" />
</stock>
</book>
<book isbn="0130655678" year="2001" edition="1">
<name>Definitive XML Schema</name>
<description>XML Schema Reference and Tutorial</description>
<courseapplicability>
<course institute="BCIT">MMSD4670</course>
<course institute="BCIT">MMSD0410</course>
<course institute="BCIT">MMSD4620</course>
</courseapplicability>
<author firstname="Priscilla" lastname="Walmsley" />
<publisher>Prentice Hall</publisher>
<price currency="US">31.49</price>
<stock>
<category>Technology</category>
<subcategory>XML Schema</subcategory>
<copiesinstock>2</copiesinstock>
<coverimage url="./images/xmlschema.gif" />
<availability days="4" />
</stock>
</book>
</bookstore>
How do I transfer this to html? I just want to know the <coverimage url="./> part thanks.
I was trying <xsl:for-each select=".">
<xsl:apply-templates select="stock/coverimage"/>
</xsl:for-each> but this didn't work. Please help me thanks.
Hi WIlliam, it sounds more like a homework assignment, rather than an Umbraco-related question?
Best bet is to get a good understanding of how XSLT processes the XML document, W3Schools has an awesome section on it:
http://w3schools.com/xsl/default.asp
Good luck, Lee.
I still don't get it. If any one has an answer please tell me thanks.
is working on a reply...