This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: How to handle xsi prefix in XSLT
- From: Janusz Dalecki <janusz dot dalecki at ot dot com dot au>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Mon, 03 Dec 2001 13:53:38 +1100
- Subject: Re: [xsl] How to handle xsi prefix in XSLT
- References: <003301c1785d$0a308c50$acc469d5@pcukmka> <3C06B2EA.29883A01@ot.com.au> <010201c17928$83146850$f70510ac@mitretek.org> <3C06C235.1558A68F@ot.com.au> <010f01c17934$2845ae00$f70510ac@mitretek.org> <3C06D8A8.B0910220@ot.com.au> <001e01c179b2$1edf1300$f70510ac@mitretek.org>
- Reply-to: xsl-list at lists dot mulberrytech dot com
I was using visual tool called "TIBCO Software Inc." without much success.
I have downloaded XML Spy and it works - so it was a tool problem.
Thanks for your help and the time you spent answering my questions.
Janusz
"Thomas B. Passin" wrote:
> Using your original xml sample, and this stylesheet, this version of the
> transformation works fine using either msxml3 or Saxon. You are going to
> have to tell us what system and processors you use, and how you are trying
> to produce the transformation, and how you are trying to use it. For
> example, if you expect the processor to find the stylesheet from the
> processing instruction in the xml file, that may not be working for a number
> of reasons.
>
> BTW, your method for producing a "Root" element works fine, but it is a
> little easier to get the same result like this:
>
> <xsl:template match='/'>
> <Root>
> <xsl:apply-templates/>
> </Root>
> </xsl:template>
>
> Tom P
>
> [Janusz Dalecki]
>
> Please forgive my ignorance, I am new to XSLT, I have fixed my XSLT to the
> one
> below which inserts a root element (“Root”) and I am still getting the same
> error – am I doing something stupid?
>
> <?xml version = "1.0" encoding = "UTF-8"?>
> <xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" xmlns:xsi
> =
> "http://www.w3.org/2000/10/XMLSchema-instance" version = "1.0">
>
> <xsl:template match = "/">
> <xsl:element name = "Root">
> <xsl:apply-templates/>
> </xsl:element>
> </xsl:template>
>
> <xsl:template match = "Command">
> <xsl:element name = "Transaction">
> <xsl:apply-templates select = "@*"/>
> </xsl:element>
> </xsl:template>
>
> <xsl:template match = "Command[@xsi:type]">
> <xsl:element name = "hhhhhhh">
> </xsl:element>
> </xsl:template>
>
> </xsl:stylesheet>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list