|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
|
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
|

Cart








