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

How to handle xsi prefix in XSLT

Subject: How to handle xsi prefix in XSLT
From: Janusz Dalecki <janusz.dalecki@xxxxxxxxx>
Date: Thu, 29 Nov 2001 09:01:25 +1100
xsi prefix
Below is simplified version of my XSLT file and full version of my XML
source file to which I am trying to apply the mentioned XSLT. The
problem I am having is in the ?<xsl:template match =
"Command[@xsi:type]">? line and more specifically with xsi:type
attribute. I am using xsi:type because that how it appears in XML file,
but when I try to apply XSLT to XML I am getting :
"org.xml.sax.SAXParseException: undefined prefix" error.
I am using TIBCO visual tool for XML and XSLT. Can anyone point anything
wrong with what I am doing, please?
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"
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>

Janusz


 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.