[xsl] How to handle xsi prefix in XSLT

Subject: [xsl] How to handle xsi prefix in XSLT
From: Janusz Dalecki <janusz.dalecki@xxxxxxxxx>
Date: Thu, 29 Nov 2001 09:27:52 +1100
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