Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • William Kuo 2 posts 22 karma points
    Apr 29, 2010 @ 09:51
    William Kuo
    0

    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&amp;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.                                                                                                

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Apr 29, 2010 @ 10:22
    Lee Kelleher
    0

    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.

  • William Kuo 2 posts 22 karma points
    Apr 29, 2010 @ 10:32
    William Kuo
    0

    I still don't get it. If any one has an answer please tell me thanks.

Please Sign in or register to post replies

Write your reply to:

Draft