I replaced match="component" by match="/" and got this from Saxon
<?xml version="1.0" encoding="UTF-8"?>
<definitions
xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xalan="http://xml.apache.org/xslt"
xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="urn:bpel:jiap"
xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="urn:bpel:jiap">
<types><!--s/b: xmlns="http://www.w3.org/2001/XMLSchema"
-->
<schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="urn:bpel:jiap
"/>
</types>
</definitions>
which I believe is correct.
And I got this from Xalan, which I believe is incorrect:
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="urn:bpel:jiap"
targetNamespace="urn:bpel:jiap">
<types>
<!--s/b: xmlns="http://www.w3.org/2001/XMLSchema"
-->
<schema xmlns="http://schemas.xmlsoap.org/wsdl/"
targetNamespace="urn:bpel:jiap "/>
</types>
</definitions>
Looks like a Xalan bug to me.
Michael Kay
http://www.saxonica.com/
-----Original Message-----
From: Michael(_dot_)Giroux(_at_)Bull(_dot_)com
[mailto:Michael(_dot_)Giroux(_at_)Bull(_dot_)com]
Sent: 13 May 2005 17:05
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: RE: [xsl] How to generate <schema> element
"Michael Kay" <mike(_at_)saxonica(_dot_)com> wrote on 05/13/2005 08:23:45 AM:
Perhaps you should post a complete (simplified)
stylesheet and we can see if other processors give
the same problem.
OK, here you go. I'll give a simple input xml, along with
the main bits of
the stylesheet. Output is intended to be abstract types
definitions for a
wsdl.
Let me know if you would prefer file attachments.
Michael
XML input file:
<?xml version='1.0' ?>
<component name='custDemo'>
</component>
Stylesheet:
<?xml version="1.0"?>
<xsl:stylesheet version = '1.0'
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsl='http://www.w3.org/1999/XSL/Transform' xmlns:tns=
"urn:bpel:jiap"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xalan="http://xml.apache.org/xslt" >
<xsl:output method="xml" indent="yes" xalan:indent-amount="2"/>
<xsl:template match="component">
<definitions targetNamespace="urn:bpel:jiap">
<xsl:element name="types">
<xsl:comment>s/b: xmlns="http://www.w3.org/2001/XMLSchema"
</xsl:comment>
<xsl:element name="schema" namespace=
"http://www.w3.org/2001/XMLSchema">
<xsl:attribute name="targetNamespace">urn:bpel:jiap
</xsl:attribute>
</xsl:element> <!-- </schema> -->
</xsl:element> <!-- </types> -->
</definitions>
</xsl:template>
</xsl:stylesheet>
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--