Subject: RE: [xsl] XML-transformation - Problem From: "Chris Bayes" <Chris@xxxxxxxxxxx> Date: Thu, 28 Dec 2000 17:26:09 -0000 |
Amit, Unless you install the new parser in replace mode you have to use the old MS namespace http://www.w3.org/TR/WD-xsl instead of http://www.w3.org/1999/XSL/Transform It is a long time since I played with the old one but I seem to remember you need a template that matches the root node or it doesn't do anything. Adding <xsl:template match="/"> <xsl:apply-templates /> </xsl:template> might do the trick. Ciao Chris XML/XSL Portal http://www.bayes.co.uk/xml >-----Original Message----- >From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx >[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of amit jain >Sent: 28 December 2000 10:19 >To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx >Subject: [xsl] XML-transformation - Problem > > >Hi Gurus, > >I am a starter and using xml-spy for transformation. I have a basic problem > >I have a xml > ><?xml version="1.0" encoding="ISO-8859-1"?> ><Book> ><title>My First XML</title> ><author>Amit</author> ><publisher> ><publisher1>Tata Mac</publisher1> ><publisher2>EEE</publisher2> ></publisher> ></Book> > >and my xsl file is as follows > ><?xml version="1.0" encoding="ISO-8859-1"?> ><!-- edited with XML Spy v2.5.1 NT - http://www.xmlspy.com --> ><xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"> ><!--XSL Stylesheet for generating simple Orgchart--> > > ><xsl:template match="/"> > ><HTML> ><BODY> ><b><xsl:value-of select="Book/title"></xsl:value-of> </b> ><b><xsl:value-of select="Book/author"></xsl:value-of> </b> ></BODY> ></HTML> > > ></xsl:template> > ></xsl:stylesheet> > >when i do the xslt transformation(f10 in xml-spy) >IT GENERATES THE HTML (works fine) > >BUT IF IF I MATCH ANYTHING OTHER THEN "/" AS SHOWN BELOW > > ><?xml version="1.0" encoding=3D"ISO-8859-1"?> ><!-- edited with XML Spy v2.5.1 NT - http://www.xmlspy.com --> ><xsl:stylesheet xmlns:xsl=3D"http://www.w3.org/TR/WD-xsl"> ><!--XSL Stylesheet for generating simple Orgchart--> > ><xsl:template match="Book"> ><HTML><BODY><xsl:apply-templates/></BODY></HTML> ></xsl:template> > ><xsl:template match="title"> ><b><xsl:apply-templates/></b> ></xsl:template> > ><xsl:template match="author"> ><b><xsl:apply-templates/></b> ></xsl:template> > ></xsl:stylesheet> > >it shows me a blank html page means does not work and i have no >clue, also how >do i compare a value using if >i mean if <author> is null in xml i don't want to display it in html. >Shall i use some other xslt processor > > >any help and a direct mail will be highly appreciated > > > > > >____________________________________________________________________ >Get free email and a permanent address at http://www.netaddress.com/?N=1 > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] XML-transformation - Problem, amit jain | Thread | [xsl] Re: Time for an XDE?? (JDE fo, Paul Kinnucan |
RE: [xsl] Node positions with xsl:n, Chris Bayes | Date | RE: [xsl] SORTING XML FILE WITH JS, Chris Bayes |
Month |