[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] XSL
Objective: Produce output that looks like this; Price Location $3.99 USA $5.30 CAN $4.55 MEX $6.55 CHN In my first scenario I can produce : books2.xsl $3.99 USA $5.30 CAN $4.55 MEX $6.55 CHN ...which you will notice does not have the header information. I tried to insert some <xsl:text> tag's to show the header "Price Location" and IE 5.5 gives me an error, indicating tags are in wrong location, which they are not. Scenario 1 header: Books.xsl - <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> (which I understand is the correct way) Scenario 2 header: Books2.xsl - <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/TR/WD-xsl"> (which is the old way from Micro Soft) In short, both the .xsl files are exactly the same, except for the header information. The old way ( Books2.xsl) produces better results, but I cannot use <xsl:text> and I assume it is because of the old header information. When I use the new header information I get a lot of other data, unexpected.
BOOKS.XSL <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <html> <xsl:apply-templates/> </html> </xsl:template> <xsl:template match="books"> <xsl:apply-templates/> </xsl:template> <xsl:template match="book[author='Rodney Goldberg']"> <xsl:apply-templates/> </xsl:template> <xsl:template match="price"> <p> <xsl:value-of select="."/> <xsl:value-of select="@loc"/> </p> </xsl:template> </xsl:stylesheet>
<xsl:template match="/"> <html> <xsl:apply-templates/> </html> </xsl:template> <xsl:template match="books"> <xsl:apply-templates/> </xsl:template> <xsl:template match="book[author='Rodney Goldberg']"> <xsl:apply-templates/> </xsl:template> <xsl:template match="price"> <p> <xsl:value-of select="."/> <xsl:value-of select="@loc"/> </p> </xsl:template> </xsl:stylesheet>
</book> <book> <ident> <isbn>4-3333-11-11001-1</isbn> <libnum>XB222-00-3388</libnum> <stocknum>D4477889038383</stocknum> </ident> <author>Max Attacx</author> <title>Felix LaFlur</title> <price>14.80</price> </book> <book> <ident> <isbn>88-222-00-5</isbn> <libnum>VWQ122-33333-89</libnum> <stocknum>B22299007322</stocknum> </ident> <author>Rodney Goldberg</author> <title>Mental Tennis</title> <title>How to play championship tennis</title> <price loc="USA">3.99</price> <price loc="CAN">5.30</price> <price loc="MEX">4.55</price> <price loc="CHN">6.55</price> </book> </books>
Voice: 650-426-4156 Cell: 916-806-0272 Email: jnelson@xxxxxxxxxxx XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|