[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

XML-transformation - Problem

Subject: XML-transformation - Problem
From: amit jain <amit_j@xxxxxxx>
Date: 28 Dec 00 05:19:26 EST
xml transformation xmlspy
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.