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

Re: How to handle xsi prefix in XSLT

Subject: Re: How to handle xsi prefix in XSLT
From: "Thomas B. Passin" <tpassin@xxxxxxxxxxxx>
Date: Thu, 29 Nov 2001 19:15:46 -0500
xsi stylesheet
[Janusz Dalecki]

Well, your stylesheet basically works but the output is not well-formed xml
because it has no root element.  You need to have an overall template that
introduces a root element.  That may be the cause of the error message.

I removed the DOCTYPE declaration because it's not needed for xslt and
because I don't have the file on my machine.  Your users probably won't
either.

With these corrections, your stylesheet DOES find the xsi:type attribute,
and does not produce errors.

Cheers,

Tom P


> Yep,
> Below is the XSLT file and XML that I am trying to apply the XSL to.
> Regards
> Janusz
>
>
> XSLT file
> <?xml version = "1.0" encoding = "UTF-8"?>
> <!DOCTYPE xsl:stylesheet SYSTEM
>
"file:///c:/PROGRAM%20FILES/TIBCOEXTENSIBILITY/XI/../Common/intrinsics/xslt.
dtd">
>
> <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 = "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>
>
> XML file
> <?xml version = "1.0" encoding = "utf-8"?>
> <?xml-stylesheet href = 'file:///C:/!work/CA_Transformation.xsl' type =
> 'text/xsl'?>
> <request xmlns:xsi = "http://www.w3.org/2000/10/XMLSchema-instance">
>  <InvocationIdentity xmlns = "">invocationId</InvocationIdentity>
>  <SourceIdentity xmlns = "">sourceId</SourceIdentity>
>  <Service xmlns = "">OnNetVoiceSubscriptionManagement</Service>
>  <Command xsi:type = "AddSubscriptionReq">
>   <routeID>route</routeID>
>   <ipAddress>2.2.2.2</ipAddress>
>   <maxConcurentCalls>7</maxConcurentCalls>
>   <pilotNumber>1111111111</pilotNumber>
>  </Command>
> </request>
>
>
>
>  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.