Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using 1999/XSL/Transform Namespace 1

Status
Not open for further replies.

tmryan

Programmer
Dec 22, 2000
73
US
I'm a newbie to XML/XSL - but I can't seem to solve a simple problem. I'm trying to use XSL to sort output (preferably in an apply-templates). When I use <xsl:stylesheet xmlns:xsl=&quot; version=&quot;1.0&quot;>
it's as if someone turns the lights out. I get nothing. If I change back to <xsl:stylesheet xmlns:xsl=&quot; version=&quot;1.0&quot;>
then I at least get output - but can't use sort with that namespace. I'm using IE 5.5. Is there a problem with IE 5.5 and XSL?
Below are my xml ans xsl.

<?xml version=&quot;1.0&quot;?>
<?xml-stylesheet type=&quot;text/xsl&quot; href=&quot;test.xsl&quot;?>
<booklist>
<book isbn=&quot;72-80081-082&quot;>
<title>The Gourmet Microwave</title>
<publisher>New Moon Books</publisher>
<price>9.95</price>
<details>Details.asp?isbn=72-80081-082</details>
<author>Charlotte M. Cooper</author>
<author>Shelley B. Burke</author>
<author>Regina P. Murphy</author>
</book>
<book isbn=&quot;72-80081-024&quot;>
<title>Sushi, Anyone?</title>
<publisher>New Moon Books</publisher>
<price>14.99</price>
<details>Details.asp?isbn=72-80081-024</details>
<author>Charlotte M. Cooper</author>
<author>Yoshi Nagase</author>
</book>
<book isbn=&quot;9-001-122-12&quot;>
<title>The Busy Executive's Database Guide</title>
<publisher>Binnet and Hardley</publisher>
<price>19.95</price>
<details>Details.asp?isbn=9-001-122-12</details>
<author>Mayumi Ohno</author>
</book>
<book isbn=&quot;9-001-122-90&quot;>
<title>Cooking With Computers: Surreptitous Balance Sheet</title>
<publisher>Binnet and Hardley</publisher>
<price>11.95</price>
<details>Details.asp?isbn=9-001-122-90</details>
<author>Mayumi Ohno</author>
<author>Ian H. Devling</author>
<author>Peter Wilson II</author>
<author>Lars Peterson</author>
</book>
<book isbn=&quot;9-001-122-01&quot;>
<title>Straight Talk About Computers</title>
<publisher>Binnet and Hardley</publisher>
<price>19.99</price>
<details>Details.asp?isbn=9-001-122-01</details>
<author>Lars Peterson</author>
</book>
</booklist>


<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl=&quot; version=&quot;1.0&quot;>
<xsl:template match=&quot;/&quot;>
<xsl:apply-templates select=&quot;//book&quot;/>
</xsl:template>

<xsl:template match=&quot;book&quot;>
<xsl:apply-templates select=&quot;title&quot;/>
<xsl:apply-templates select=&quot;price&quot;/>
<xsl:apply-templates select=&quot;author&quot;/>
</xsl:template>

<xsl:template match=&quot;title&quot;>
<xsl:value-of select=&quot;.&quot;/>
</xsl:template>

<xsl:template match=&quot;price&quot;>
<I><xsl:value-of select=&quot;.&quot;/></I>
</xsl:template>

<xsl:template match=&quot;author&quot;>
<I><xsl:value-of select=&quot;.&quot;/></I>
</xsl:template>

</xsl:stylesheet>


Thanks for any help you can give.
Tim Ryan
 
To use &quot; with IE5.5 you have to download and install MSXML 3.0 SP1 from Microsoft and run XmlInst.exe to replace the Parser used by the Internet explorer.

If you just want to do things programmatically without viewing the XML-files in the Browser there is no need to replace the default Parser through Xmlinst.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top