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

RE: XML-transformation - Problem

Subject: RE: XML-transformation - Problem
From: "Chris Bayes" <Chris@xxxxxxxxxxx>
Date: Thu, 28 Dec 2000 17:26:09 -0000
xml transformation problem xmlns
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:  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

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.