You are viewing a plain text version of this content. The canonical link for it is here.
Posted to woden-dev@ws.apache.org by ry...@apache.org on 2008/01/14 04:12:22 UTC
svn commit: r611700 - in /webservices/woden/trunk/java/wsdl-viewer:
build/build.xml src/wsdl-viewer-global.xsl src/wsdl-viewer-modules.xsl
src/wsdl-viewer-service.xsl src/wsdl-viewer-src.xsl
src/wsdl-viewer-util.xsl wsdl-viewer.xsl
Author: ryman
Date: Sun Jan 13 19:12:20 2008
New Revision: 611700
URL: http://svn.apache.org/viewvc?rev=611700&view=rev
Log:
[WODEN-188] Committed patch WODEN-188-02.patch from Tomi.
Modified:
webservices/woden/trunk/java/wsdl-viewer/build/build.xml
webservices/woden/trunk/java/wsdl-viewer/src/wsdl-viewer-global.xsl
webservices/woden/trunk/java/wsdl-viewer/src/wsdl-viewer-modules.xsl
webservices/woden/trunk/java/wsdl-viewer/src/wsdl-viewer-service.xsl
webservices/woden/trunk/java/wsdl-viewer/src/wsdl-viewer-src.xsl
webservices/woden/trunk/java/wsdl-viewer/src/wsdl-viewer-util.xsl
webservices/woden/trunk/java/wsdl-viewer/wsdl-viewer.xsl
Modified: webservices/woden/trunk/java/wsdl-viewer/build/build.xml
URL: http://svn.apache.org/viewvc/webservices/woden/trunk/java/wsdl-viewer/build/build.xml?rev=611700&r1=611699&r2=611700&view=diff
==============================================================================
--- webservices/woden/trunk/java/wsdl-viewer/build/build.xml (original)
+++ webservices/woden/trunk/java/wsdl-viewer/build/build.xml Sun Jan 13 19:12:20 2008
@@ -68,6 +68,10 @@
<gzip zipfile="${dist.tar.gz}" src="${dist.tar}"/>
<delete file="${dist.tar}" failonerror="false"/>
+
+ <copy todir="${basedir}" >
+ <fileset file="${dist.image.viewer}"/>
+ </copy>
</target>
<target name="test" depends="createPackage">
Modified: webservices/woden/trunk/java/wsdl-viewer/src/wsdl-viewer-global.xsl
URL: http://svn.apache.org/viewvc/webservices/woden/trunk/java/wsdl-viewer/src/wsdl-viewer-global.xsl?rev=611700&r1=611699&r2=611700&view=diff
==============================================================================
--- webservices/woden/trunk/java/wsdl-viewer/src/wsdl-viewer-global.xsl (original)
+++ webservices/woden/trunk/java/wsdl-viewer/src/wsdl-viewer-global.xsl Sun Jan 13 19:12:20 2008
@@ -81,14 +81,11 @@
==================================================================
-->
-<xsl:variable name="global.wsdl-name" select="concat(/*/*[local-name() = 'import' and @location][1]/@location, /*/*[local-name() = 'include' and @location][1]/@location)"/>
-<xsl:variable name="consolidated-wsdl" select="/*|document($global.wsdl-name)/*"/>
+<xsl:variable name="global.wsdl-name" select="/*/*[(local-name() = 'import' or local-name() = 'include') and @location][1]/@location"/>
+<xsl:variable name="consolidated-wsdl" select="/* | document($global.wsdl-name)/*"/>
-<xsl:variable name="global.types" select="$consolidated-wsdl/*[local-name() = 'types']"/>
-<xsl:variable name="global.xsd" select="$global.types//xsd:import[@schemaLocation][1] | $global.types//xsd:include[@schemaLocation][1]"/>
-<xsl:variable name="global.xsd-name" select="$global.xsd[1]/@schemaLocation"/>
-<xsl:variable name="consolidated-xsd.data" select="document($global.xsd-name)/xsd:schema/xsd:*|/*/*[local-name() = 'types']/xsd:schema/xsd:*"/>
-<xsl:variable name="consolidated-xsd" select="$consolidated-xsd.data[local-name() = 'complexType' or local-name() = 'element' or local-name() = 'simpleType']"/>
+<xsl:variable name="global.xsd-name" select="($consolidated-wsdl/*[local-name() = 'types']//xsd:import[@schemaLocation] | $consolidated-wsdl/*[local-name() = 'types']//xsd:include[@schemaLocation])[1]/@schemaLocation"/>
+<xsl:variable name="consolidated-xsd" select="(document($global.xsd-name)/xsd:schema/xsd:*|/*/*[local-name() = 'types']/xsd:schema/xsd:*)[local-name() = 'complexType' or local-name() = 'element' or local-name() = 'simpleType']"/>
<xsl:variable name="global.service-name" select="concat($consolidated-wsdl/ws:service/@name, $consolidated-wsdl/ws2:service/@name)" />
<xsl:variable name="global.binding-name" select="concat($consolidated-wsdl/ws:binding/@name, $consolidated-wsdl/ws2:binding/@name)" />
Modified: webservices/woden/trunk/java/wsdl-viewer/src/wsdl-viewer-modules.xsl
URL: http://svn.apache.org/viewvc/webservices/woden/trunk/java/wsdl-viewer/src/wsdl-viewer-modules.xsl?rev=611700&r1=611699&r2=611700&view=diff
==============================================================================
--- webservices/woden/trunk/java/wsdl-viewer/src/wsdl-viewer-modules.xsl (original)
+++ webservices/woden/trunk/java/wsdl-viewer/src/wsdl-viewer-modules.xsl Sun Jan 13 19:12:20 2008
@@ -136,6 +136,9 @@
* 2007-08-01 - 3.0.08 - Fix: xsl:template name="render-type"
* Fix: typo - "Impotred WSDL" should be "Impotred WSDL"
* 2007-08-16 - 3.0.09 - Fix: xsl:template name="render-type" - anti recursion
+* 2007-12-05 - 3.1.00 - Modularized
+* 2007-12-23 - 3.1.01 - Terminating message by WS without interface or service definition was removed
+* (seems to be a correct state)
* ====================================================================
-->
@@ -269,7 +272,7 @@
</xsl:if>
<xsl:if test="$ENABLE-ABOUT-PARAGRAPH">
<xsl:call-template name="about.render">
- <xsl:with-param name="version">3.1.00</xsl:with-param>
+ <xsl:with-param name="version" select="$wsdl-viewer.version" />
</xsl:call-template>
</xsl:if>
</div>
@@ -360,7 +363,7 @@
</div>
<xsl:apply-templates select="/*/*[local-name() = 'import'][@location]/@location" mode="src.import"/>
- <xsl:apply-templates select="$global.types//xsd:import[@schemaLocation]/@schemaLocation | $global.types//xsd:include[@schemaLocation]/@schemaLocation" mode="src.import"/>
+ <xsl:apply-templates select="$consolidated-wsdl/*[local-name() = 'types']//xsd:import[@schemaLocation]/@schemaLocation | $consolidated-wsdl/*[local-name() = 'types']//xsd:include[@schemaLocation]/@schemaLocation" mode="src.import"/>
</div>
</xsl:template>
Modified: webservices/woden/trunk/java/wsdl-viewer/src/wsdl-viewer-service.xsl
URL: http://svn.apache.org/viewvc/webservices/woden/trunk/java/wsdl-viewer/src/wsdl-viewer-service.xsl?rev=611700&r1=611699&r2=611700&view=diff
==============================================================================
--- webservices/woden/trunk/java/wsdl-viewer/src/wsdl-viewer-service.xsl (original)
+++ webservices/woden/trunk/java/wsdl-viewer/src/wsdl-viewer-service.xsl Sun Jan 13 19:12:20 2008
@@ -98,16 +98,28 @@
</xsl:if>
</h3>
+ <xsl:variable name="base-iface-name">
+ <xsl:apply-templates select="@extends" mode="qname.normalized"/>
+ </xsl:variable>
+
+ <xsl:if test="$base-iface-name">
+ <div class="label">Extends: </div>
+ <div class="value"><xsl:value-of select="$base-iface-name"/></div>
+ </xsl:if>
+
+ <xsl:variable name="base-iface" select="$consolidated-wsdl/ws2:interface[@name = $base-iface-name]"/>
+
<div class="label">Operations:</div>
<div class="value"><xsl:text>
</xsl:text>
<ol style="line-height: 180%;">
- <xsl:apply-templates select="ws2:operation" mode="service">
+ <xsl:apply-templates select="$base-iface/ws2:operation | ws2:operation" mode="service">
<xsl:sort select="@name"/>
</xsl:apply-templates>
</ol>
</div>
</xsl:template>
+
<!--
==================================================================
Modified: webservices/woden/trunk/java/wsdl-viewer/src/wsdl-viewer-src.xsl
URL: http://svn.apache.org/viewvc/webservices/woden/trunk/java/wsdl-viewer/src/wsdl-viewer-src.xsl?rev=611700&r1=611699&r2=611700&view=diff
==============================================================================
--- webservices/woden/trunk/java/wsdl-viewer/src/wsdl-viewer-src.xsl (original)
+++ webservices/woden/trunk/java/wsdl-viewer/src/wsdl-viewer-src.xsl Sun Jan 13 19:12:20 2008
@@ -44,23 +44,39 @@
==================================================================
-->
<xsl:template match="@*" mode="src.import">
- <h2><a name="{concat($SRC-FILE-PREFIX, generate-id(..))}">
- <xsl:choose>
- <xsl:when test="parent::xsd:include">Included </xsl:when>
- <xsl:otherwise>Imported </xsl:otherwise>
- </xsl:choose>
+ <xsl:param name="src.import.stack"/>
+ <xsl:variable name="recursion.label" select="concat('[', string(.), ']')"/>
+ <xsl:variable name="recursion.check" select="concat($src.import.stack, $recursion.label)"/>
<xsl:choose>
- <xsl:when test="name() = 'location'">WSDL </xsl:when>
- <xsl:otherwise>Schema </xsl:otherwise>
- </xsl:choose>
- <i><xsl:value-of select="."/></i></a></h2>
+ <xsl:when test="contains($src.import.stack, $recursion.label)">
+ <h2 style="red"><xsl:value-of select="concat('Cyclic include / import: ', $recursion.check)"/></h2>
+ </xsl:when>
+ <xsl:otherwise>
+ <h2><a name="{concat($SRC-FILE-PREFIX, generate-id(..))}">
+ <xsl:choose>
+ <xsl:when test="parent::xsd:include">Included </xsl:when>
+ <xsl:otherwise>Imported </xsl:otherwise>
+ </xsl:choose>
- <div class="box">
- <xsl:apply-templates select="document(.)" mode="src"/>
- </div>
- <xsl:apply-templates select="/*/*[local-name() = 'import'][@location]/@location" mode="src.import"/>
- <xsl:apply-templates select="document(.)//xsd:import[@schemaLocation]/@schemaLocation" mode="src.import"/>
+ <xsl:choose>
+ <xsl:when test="name() = 'location'">WSDL </xsl:when>
+ <xsl:otherwise>Schema </xsl:otherwise>
+ </xsl:choose>
+ <i><xsl:value-of select="."/></i></a></h2>
+
+ <div class="box">
+ <xsl:apply-templates select="document(string(.))" mode="src"/>
+ </div>
+
+ <xsl:apply-templates select="document(string(.))/*/*[local-name() = 'import'][@location]/@location" mode="src.import">
+ <xsl:with-param name="src.import.stack" select="$recursion.check"/>
+ </xsl:apply-templates>
+ <xsl:apply-templates select="document(string(.))//xsd:import[@schemaLocation]/@schemaLocation" mode="src.import">
+ <xsl:with-param name="src.import.stack" select="$recursion.check"/>
+ </xsl:apply-templates>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:template>
<!--
Modified: webservices/woden/trunk/java/wsdl-viewer/src/wsdl-viewer-util.xsl
URL: http://svn.apache.org/viewvc/webservices/woden/trunk/java/wsdl-viewer/src/wsdl-viewer-util.xsl?rev=611700&r1=611699&r2=611700&view=diff
==============================================================================
--- webservices/woden/trunk/java/wsdl-viewer/src/wsdl-viewer-util.xsl (original)
+++ webservices/woden/trunk/java/wsdl-viewer/src/wsdl-viewer-util.xsl Sun Jan 13 19:12:20 2008
@@ -57,9 +57,11 @@
<xsl:choose>
<xsl:when test="$global.service-name"><xsl:value-of select="concat('Web Service: ', $global.service-name)"/></xsl:when>
<xsl:when test="$global.binding-name"><xsl:value-of select="concat('WS Binding: ', $global.binding-name)"/></xsl:when>
- <xsl:when test="$consolidated-wsdl/ws2:interface/@name"><xsl:value-of select="concat('WS Interface: ', $consolidated-wsdl/ws2:interface/@name)"/></xsl:when>
- <xsl:otherwise><xsl:message terminate="yes">Syntax error in element <xsl:call-template name="src.syntax-error.path"/></xsl:message>
+ <xsl:when test="ws2:interface/@name"><xsl:value-of select="concat('WS Interface: ', ws2:interface/@name)"/></xsl:when>
+ <xsl:otherwise>Web Service Fragment</xsl:otherwise>
+<!-- <xsl:otherwise><xsl:message terminate="yes">Syntax error in element <xsl:call-template name="src.syntax-error.path"/></xsl:message>
</xsl:otherwise>
+-->
</xsl:choose>
</xsl:template>
Modified: webservices/woden/trunk/java/wsdl-viewer/wsdl-viewer.xsl
URL: http://svn.apache.org/viewvc/webservices/woden/trunk/java/wsdl-viewer/wsdl-viewer.xsl?rev=611700&r1=611699&r2=611700&view=diff
==============================================================================
--- webservices/woden/trunk/java/wsdl-viewer/wsdl-viewer.xsl (original)
+++ webservices/woden/trunk/java/wsdl-viewer/wsdl-viewer.xsl Sun Jan 13 19:12:20 2008
@@ -1,147 +1,150 @@
<?xml version="1.0" encoding="utf-8"?>
-<!--
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
--->
-
-
-<!--
-* ====================================================================
-* wsdl-viewer.xsl
-* Version: 3.1.01
-*
-* URL: http://tomi.vanek.sk/xml/wsdl-viewer.xsl
-*
-* Author: tomi vanek
-* Inspiration: Uche Ogbui - WSDL processing with XSLT
-* http://www-106.ibm.com/developerworks/library/ws-trans/index.html
-* ====================================================================
--->
-
-
-<!--
-* ====================================================================
-* Description:
-* wsdl-viewer.xsl is a lightweight XSLT 1.0 transformation with minimal
-* usage of any hacks that extend the possibilities of the transformation
-* over the XSLT 1.0 constraints but eventually would harm the engine independance.
-*
-* The transformation has to run even in the browser offered XSLT engines
-* (tested in IE 6 and Firefox) and in ANT "batch" processing.
-* ====================================================================
-* How to add the HTML look to a WSDL:
-* <?xml version="1.0" encoding="utf-8"?>
-* <?xml-stylesheet type="text/xsl" href="wsdl-viewer.xsl"?>
-* <wsdl:definitions ...>
-* ... Here is the service declaration
-* </wsdl:definitions>
-*
-* The web-browsers (in Windows) are not able by default automatically recognize
-* the ".wsdl" file type (suffix). For the type recognition the WSDL file has
-* to be renamed by adding the suffix ".xml" - i.e. "myservice.wsdl.xml".
-* ====================================================================
-* Constraints:
-* 1. Processing of imported files
-* 1.1 Only 1 imported WSDL and 1 imported XSD is processed
-* (well, maybe with a smarter recursive strategy this restriction could be overcome)
-* 1.2 No recursive including is supported (i.e. includes in included XSD are ignored)
-* 2. Namespace support
-* 2.1 Namespaces are not taken in account by processing (references with NS)
-* 3. Source code
-* 3.1 Only the source code allready processed by the XML parser is rendered - implications:
-* == no access to the XML head line (<?xml version="1.0" encoding="utf-8"?>)
-* == "expanded" CDATA blocks (parser processes the CDATA,
-* XSLT does not have access to the original code)
-* == no control over the code page
-* == processing of special characters
-* == namespace nodes are not rendered (just the namespace aliases)
-* ====================================================================
-* Possible improvements:
-* * Functional requirements
-* + SOAP 1.2 binding (http://schemas.xmlsoap.org/wsdl/soap12/WSDL11SOAP12.pdf)
-* + WSDL 2.0 (http://www.w3.org/TR/2006/CR-wsdl20-primer-20060327/)
-* + Recognition of WSDL patterns (interface, binding, service instance, ...)
-* - Creating an xsd-viewer.xsl for XML-Schema file viewing
-* (extracting the functionality from wsdl-viewer into separate XSLT)
-* - Check the full support of the WSDL and XSD going through the standards
-* - Real-world WSDL testing
-* - XSLT 2.0 (http://www-128.ibm.com/developerworks/library/x-xslt20pt5.html) ???
-* ? Adding more derived information
-* * to be defined, what non-trivial information can we read out from the WSDL
-* * XSLT
-* + Modularization
-* - Is it meaningful?
-* - Maybe more distribution alternatives (modular, fat monolithic, thin performance monolithic)?
-* - Distribution build automatization
-* + Dynamic page: JavaSript
-* + Performance
-* - Better code comments / documentation
-* - SOAP client form - for testing the web service (AJAX based)
-* - New XSD parser - clean-up the algorithm
-* - Complete (recursive, multiple) include support
-* ? Namespace-aware version (no string processing hacks ;-)
-* * I think, because of the goal to support as many engines as possible,
-* this requirement is unrealistic. Maybe when XSLT 2.0 will be supported
-* in a huge majority of platforms, we can rethink this point....
-* (problems with different functionality of namespace-uri XPath function by different engines)
-* * Development architecture
-* - Setup of the development infrastructure
-* - Unit testing
-* ? Collaboration platform
-* * Documentation, web
-* - Better user guide
-* ? Forum, Wiki
-* ====================================================================
--->
-
-
-<!--
-* ====================================================================
-* History:
-* 2005-04-15 - Initial implementation
-* 2005-09-12 - Removed xsl:key to be able to use the James Clark's XT engine on W3C web-site
-* 2006-10-06 - Removed the Oliver Becker's method of conditional selection
-* of a value in a single expression (in Xalan/XSLTC this hack does not work!)
-* 2005-10-07 - Duplicated operations
-* 2006-12-08 - Import element support
-* 2006-12-14 - Displays all fault elements (not just the first one)
-* 2006-12-28 - W3C replaced silently the James Clark's XT engine with Michael Kay's closed-source Saxon!
-* wsdl-viewer.xsl will no longer support XT engine
-* 2007-02-28 - Stack-overflow bug (if the XSD element @name and @type are identic)
-* 2007-03-08 - 3.0.00 - New parsing, new layout
-* 2007-03-28 - 3.0.01 - Fix: New anti-recursion defense (no error message by recursion
-* because of dirty solution of namespace processing)
-* - Added: variables at the top to turn on/off certain details
-* 2007-03-29 - 3.0.02 - Layout clean-up for IE
-* 2007-03-29 - 3.0.03 - Fix: Anti-recursion algorithm
-* 2007-03-30 - 3.0.04 - Added: source code rendering of imported WSDL and XSD
-* 2007-04-15 - 3.0.05 - Fix: Recursive calls in element type rendering
-* - Fix: Rendering of messages (did not render the message types of complex types)
-* - Fix: Links in src. by arrays
-* - Fix: $binding-info
-* 2007-04-15 - 3.0.06 - Added: Extended rendering control ENABLE-xxx parameters
-* - Changed: Anti-recursion algorithm has recursion-depth parameter
-* 2007-07-19 - 3.0.07 - Fix: Rendering of array type in detail
-* 2007-08-01 - 3.0.08 - Fix: xsl:template name="render-type"
-* Fix: typo - "Impotred WSDL" should be "Impotred WSDL"
-* 2007-08-16 - 3.0.09 - Fix: xsl:template name="render-type" - anti recursion
-* ====================================================================
+<!--
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-->
+
+
+<!--
+* ====================================================================
+* wsdl-viewer.xsl
+* Version: 3.1.01
+*
+* URL: http://tomi.vanek.sk/xml/wsdl-viewer.xsl
+*
+* Author: tomi vanek
+* Inspiration: Uche Ogbui - WSDL processing with XSLT
+* http://www-106.ibm.com/developerworks/library/ws-trans/index.html
+* ====================================================================
+-->
+
+
+<!--
+* ====================================================================
+* Description:
+* wsdl-viewer.xsl is a lightweight XSLT 1.0 transformation with minimal
+* usage of any hacks that extend the possibilities of the transformation
+* over the XSLT 1.0 constraints but eventually would harm the engine independance.
+*
+* The transformation has to run even in the browser offered XSLT engines
+* (tested in IE 6 and Firefox) and in ANT "batch" processing.
+* ====================================================================
+* How to add the HTML look to a WSDL:
+* <?xml version="1.0" encoding="utf-8"?>
+* <?xml-stylesheet type="text/xsl" href="wsdl-viewer.xsl"?>
+* <wsdl:definitions ...>
+* ... Here is the service declaration
+* </wsdl:definitions>
+*
+* The web-browsers (in Windows) are not able by default automatically recognize
+* the ".wsdl" file type (suffix). For the type recognition the WSDL file has
+* to be renamed by adding the suffix ".xml" - i.e. "myservice.wsdl.xml".
+* ====================================================================
+* Constraints:
+* 1. Processing of imported files
+* 1.1 Only 1 imported WSDL and 1 imported XSD is processed
+* (well, maybe with a smarter recursive strategy this restriction could be overcome)
+* 1.2 No recursive including is supported (i.e. includes in included XSD are ignored)
+* 2. Namespace support
+* 2.1 Namespaces are not taken in account by processing (references with NS)
+* 3. Source code
+* 3.1 Only the source code allready processed by the XML parser is rendered - implications:
+* == no access to the XML head line (<?xml version="1.0" encoding="utf-8"?>)
+* == "expanded" CDATA blocks (parser processes the CDATA,
+* XSLT does not have access to the original code)
+* == no control over the code page
+* == processing of special characters
+* == namespace nodes are not rendered (just the namespace aliases)
+* ====================================================================
+* Possible improvements:
+* * Functional requirements
+* + SOAP 1.2 binding (http://schemas.xmlsoap.org/wsdl/soap12/WSDL11SOAP12.pdf)
+* + WSDL 2.0 (http://www.w3.org/TR/2006/CR-wsdl20-primer-20060327/)
+* + Recognition of WSDL patterns (interface, binding, service instance, ...)
+* - Creating an xsd-viewer.xsl for XML-Schema file viewing
+* (extracting the functionality from wsdl-viewer into separate XSLT)
+* - Check the full support of the WSDL and XSD going through the standards
+* - Real-world WSDL testing
+* - XSLT 2.0 (http://www-128.ibm.com/developerworks/library/x-xslt20pt5.html) ???
+* ? Adding more derived information
+* * to be defined, what non-trivial information can we read out from the WSDL
+* * XSLT
+* + Modularization
+* - Is it meaningful?
+* - Maybe more distribution alternatives (modular, fat monolithic, thin performance monolithic)?
+* - Distribution build automatization
+* + Dynamic page: JavaSript
+* + Performance
+* - Better code comments / documentation
+* - SOAP client form - for testing the web service (AJAX based)
+* - New XSD parser - clean-up the algorithm
+* - Complete (recursive, multiple) include support
+* ? Namespace-aware version (no string processing hacks ;-)
+* * I think, because of the goal to support as many engines as possible,
+* this requirement is unrealistic. Maybe when XSLT 2.0 will be supported
+* in a huge majority of platforms, we can rethink this point....
+* (problems with different functionality of namespace-uri XPath function by different engines)
+* * Development architecture
+* - Setup of the development infrastructure
+* - Unit testing
+* ? Collaboration platform
+* * Documentation, web
+* - Better user guide
+* ? Forum, Wiki
+* ====================================================================
+-->
+
+
+<!--
+* ====================================================================
+* History:
+* 2005-04-15 - Initial implementation
+* 2005-09-12 - Removed xsl:key to be able to use the James Clark's XT engine on W3C web-site
+* 2006-10-06 - Removed the Oliver Becker's method of conditional selection
+* of a value in a single expression (in Xalan/XSLTC this hack does not work!)
+* 2005-10-07 - Duplicated operations
+* 2006-12-08 - Import element support
+* 2006-12-14 - Displays all fault elements (not just the first one)
+* 2006-12-28 - W3C replaced silently the James Clark's XT engine with Michael Kay's closed-source Saxon!
+* wsdl-viewer.xsl will no longer support XT engine
+* 2007-02-28 - Stack-overflow bug (if the XSD element @name and @type are identic)
+* 2007-03-08 - 3.0.00 - New parsing, new layout
+* 2007-03-28 - 3.0.01 - Fix: New anti-recursion defense (no error message by recursion
+* because of dirty solution of namespace processing)
+* - Added: variables at the top to turn on/off certain details
+* 2007-03-29 - 3.0.02 - Layout clean-up for IE
+* 2007-03-29 - 3.0.03 - Fix: Anti-recursion algorithm
+* 2007-03-30 - 3.0.04 - Added: source code rendering of imported WSDL and XSD
+* 2007-04-15 - 3.0.05 - Fix: Recursive calls in element type rendering
+* - Fix: Rendering of messages (did not render the message types of complex types)
+* - Fix: Links in src. by arrays
+* - Fix: $binding-info
+* 2007-04-15 - 3.0.06 - Added: Extended rendering control ENABLE-xxx parameters
+* - Changed: Anti-recursion algorithm has recursion-depth parameter
+* 2007-07-19 - 3.0.07 - Fix: Rendering of array type in detail
+* 2007-08-01 - 3.0.08 - Fix: xsl:template name="render-type"
+* Fix: typo - "Impotred WSDL" should be "Impotred WSDL"
+* 2007-08-16 - 3.0.09 - Fix: xsl:template name="render-type" - anti recursion
+* 2007-12-05 - 3.1.00 - Modularized
+* 2007-12-23 - 3.1.01 - Terminating message by WS without interface or service definition was removed
+* (seems to be a correct state)
+* ====================================================================
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:ws="http://schemas.xmlsoap.org/wsdl/" xmlns:ws2="http://www.w3.org/ns/wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:local="http://tomi.vanek.sk/xml/wsdl-viewer" version="1.0" exclude-result-prefixes="ws ws2 xsd soap local">
@@ -153,10 +156,10 @@
-<!--
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- Begin of included transformation: wsdl-viewer-global.xsl
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+<!--
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+ Begin of included transformation: wsdl-viewer-global.xsl
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-->
<xsl:param name="ENABLE-SERVICE-PARAGRAPH" select="true()"/>
<xsl:param name="ENABLE-OPERATIONS-PARAGRAPH" select="true()"/>
@@ -180,31 +183,28 @@
<xsl:variable name="OPERATIONS-PREFIX">op.</xsl:variable>
<xsl:variable name="PORT-PREFIX">port.</xsl:variable>
<xsl:variable name="IFACE-PREFIX">iface.</xsl:variable>
-<xsl:variable name="global.wsdl-name" select="concat(/*/*[local-name() = 'import' and @location][1]/@location, /*/*[local-name() = 'include' and @location][1]/@location)"/>
-<xsl:variable name="consolidated-wsdl" select="/*|document($global.wsdl-name)/*"/>
-<xsl:variable name="global.types" select="$consolidated-wsdl/*[local-name() = 'types']"/>
-<xsl:variable name="global.xsd" select="$global.types//xsd:import[@schemaLocation][1] | $global.types//xsd:include[@schemaLocation][1]"/>
-<xsl:variable name="global.xsd-name" select="$global.xsd[1]/@schemaLocation"/>
-<xsl:variable name="consolidated-xsd.data" select="document($global.xsd-name)/xsd:schema/xsd:*|/*/*[local-name() = 'types']/xsd:schema/xsd:*"/>
-<xsl:variable name="consolidated-xsd" select="$consolidated-xsd.data[local-name() = 'complexType' or local-name() = 'element' or local-name() = 'simpleType']"/>
+<xsl:variable name="global.wsdl-name" select="/*/*[(local-name() = 'import' or local-name() = 'include') and @location][1]/@location"/>
+<xsl:variable name="consolidated-wsdl" select="/* | document($global.wsdl-name)/*"/>
+<xsl:variable name="global.xsd-name" select="($consolidated-wsdl/*[local-name() = 'types']//xsd:import[@schemaLocation] | $consolidated-wsdl/*[local-name() = 'types']//xsd:include[@schemaLocation])[1]/@schemaLocation"/>
+<xsl:variable name="consolidated-xsd" select="(document($global.xsd-name)/xsd:schema/xsd:*|/*/*[local-name() = 'types']/xsd:schema/xsd:*)[local-name() = 'complexType' or local-name() = 'element' or local-name() = 'simpleType']"/>
<xsl:variable name="global.service-name" select="concat($consolidated-wsdl/ws:service/@name, $consolidated-wsdl/ws2:service/@name)"/>
<xsl:variable name="global.binding-name" select="concat($consolidated-wsdl/ws:binding/@name, $consolidated-wsdl/ws2:binding/@name)"/>
<xsl:variable name="html-title">
<xsl:apply-templates select="/*" mode="html-title.render"/>
</xsl:variable>
-<!--
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- End of included transformation: wsdl-viewer-global.xsl
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+<!--
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+ End of included transformation: wsdl-viewer-global.xsl
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-->
-<!--
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- Begin of included transformation: wsdl-viewer-css.xsl
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+<!--
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+ Begin of included transformation: wsdl-viewer-css.xsl
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-->
<xsl:variable name="css">
@@ -722,19 +722,19 @@
</xsl:variable>
-<!--
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- End of included transformation: wsdl-viewer-css.xsl
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+<!--
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+ End of included transformation: wsdl-viewer-css.xsl
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-->
-<!--
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- Begin of included transformation: wsdl-viewer-util.xsl
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+<!--
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+ Begin of included transformation: wsdl-viewer-util.xsl
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-->
<xsl:template match="@*" mode="qname.normalized">
<xsl:variable name="local" select="substring-after(., ':')"/>
@@ -755,13 +755,13 @@
<xsl:when test="$global.binding-name">
<xsl:value-of select="concat('WS Binding: ', $global.binding-name)"/>
</xsl:when>
- <xsl:when test="$consolidated-wsdl/ws2:interface/@name">
-<xsl:value-of select="concat('WS Interface: ', $consolidated-wsdl/ws2:interface/@name)"/>
+ <xsl:when test="ws2:interface/@name">
+<xsl:value-of select="concat('WS Interface: ', ws2:interface/@name)"/>
</xsl:when>
- <xsl:otherwise>
-<xsl:message terminate="yes">Syntax error in element <xsl:call-template name="src.syntax-error.path"/>
-</xsl:message>
+ <xsl:otherwise>Web Service Fragment</xsl:otherwise>
+<!-- <xsl:otherwise><xsl:message terminate="yes">Syntax error in element <xsl:call-template name="src.syntax-error.path"/></xsl:message>
</xsl:otherwise>
+-->
</xsl:choose>
</xsl:template>
<xsl:template name="src.syntax-error">
@@ -820,18 +820,18 @@
</xsl:template>
-<!--
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- End of included transformation: wsdl-viewer-util.xsl
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+<!--
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+ End of included transformation: wsdl-viewer-util.xsl
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-->
-<!--
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- Begin of included transformation: wsdl-viewer-service.xsl
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+<!--
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+ Begin of included transformation: wsdl-viewer-service.xsl
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-->
<xsl:template match="ws:service|ws2:service" mode="service-start">
<div class="indent">
@@ -900,12 +900,25 @@
</xsl:if>
</h3>
+ <xsl:variable name="base-iface-name">
+ <xsl:apply-templates select="@extends" mode="qname.normalized"/>
+ </xsl:variable>
+
+ <xsl:if test="$base-iface-name">
+ <div class="label">Extends: </div>
+ <div class="value">
+<xsl:value-of select="$base-iface-name"/>
+</div>
+ </xsl:if>
+
+ <xsl:variable name="base-iface" select="$consolidated-wsdl/ws2:interface[@name = $base-iface-name]"/>
+
<div class="label">Operations:</div>
<div class="value">
<xsl:text>
</xsl:text>
<ol style="line-height: 180%;">
- <xsl:apply-templates select="ws2:operation" mode="service">
+ <xsl:apply-templates select="$base-iface/ws2:operation | ws2:operation" mode="service">
<xsl:sort select="@name"/>
</xsl:apply-templates>
</ol>
@@ -1017,18 +1030,18 @@
</xsl:if>
</xsl:template>
-<!--
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- End of included transformation: wsdl-viewer-service.xsl
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+<!--
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+ End of included transformation: wsdl-viewer-service.xsl
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-->
-<!--
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- Begin of included transformation: wsdl-viewer-operations.xsl
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+<!--
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+ Begin of included transformation: wsdl-viewer-operations.xsl
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-->
<xsl:template match="ws2:interface" mode="operations">
<xsl:if test="$ENABLE-PORTTYPE-NAME">
@@ -1297,18 +1310,18 @@
</div>
</xsl:template>
-<!--
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- End of included transformation: wsdl-viewer-operations.xsl
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+<!--
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+ End of included transformation: wsdl-viewer-operations.xsl
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-->
-<!--
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- Begin of included transformation: wsdl-viewer-xsd-tree.xsl
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+<!--
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+ Begin of included transformation: wsdl-viewer-xsd-tree.xsl
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-->
<xsl:template match="xsd:simpleType" mode="operations.message.part"/>
<xsl:template name="recursion.should.continue">
@@ -1405,8 +1418,8 @@
</xsl:choose>
</xsl:variable>
<xsl:variable name="base-type" select="$consolidated-xsd[@name = $type-name][1]"/>
- <!-- xsl:if test="not($type/@abstract)">
- <xsl:apply-templates select="$type"/>
+ <!-- xsl:if test="not($type/@abstract)">
+ <xsl:apply-templates select="$type"/>
</xsl:if -->
<xsl:if test="$base-type != 'Array'">
<xsl:apply-templates select="$base-type" mode="operations.message.part">
@@ -1516,8 +1529,8 @@
</xsl:template>
<xsl:template match="xsd:element | xsd:attribute" mode="operations.message.part">
<xsl:param name="anti.recursion"/>
-<!--
- <xsl:variable name="recursion.label" select="concat('[', @name, ']')"/>
+<!--
+ <xsl:variable name="recursion.label" select="concat('[', @name, ']')"/>
-->
<li>
<xsl:variable name="local-ref" select="concat(@name, substring-after(@ref, ':'))"/>
@@ -1796,42 +1809,60 @@
<xsl:text disable-output-escaping="yes">'</xsl:text>
</xsl:template>
-<!--
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- End of included transformation: wsdl-viewer-xsd-tree.xsl
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+<!--
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+ End of included transformation: wsdl-viewer-xsd-tree.xsl
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-->
-<!--
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- Begin of included transformation: wsdl-viewer-src.xsl
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+<!--
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+ Begin of included transformation: wsdl-viewer-src.xsl
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-->
<xsl:template match="@*" mode="src.import">
- <h2>
-<a name="{concat($SRC-FILE-PREFIX, generate-id(..))}">
- <xsl:choose>
- <xsl:when test="parent::xsd:include">Included </xsl:when>
- <xsl:otherwise>Imported </xsl:otherwise>
- </xsl:choose>
+ <xsl:param name="src.import.stack"/>
+ <xsl:variable name="recursion.label" select="concat('[', string(.), ']')"/>
+ <xsl:variable name="recursion.check" select="concat($src.import.stack, $recursion.label)"/>
<xsl:choose>
- <xsl:when test="name() = 'location'">WSDL </xsl:when>
- <xsl:otherwise>Schema </xsl:otherwise>
- </xsl:choose>
- <i>
+ <xsl:when test="contains($src.import.stack, $recursion.label)">
+ <h2 style="red">
+<xsl:value-of select="concat('Cyclic include / import: ', $recursion.check)"/>
+</h2>
+ </xsl:when>
+ <xsl:otherwise>
+ <h2>
+<a name="{concat($SRC-FILE-PREFIX, generate-id(..))}">
+ <xsl:choose>
+ <xsl:when test="parent::xsd:include">Included </xsl:when>
+ <xsl:otherwise>Imported </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:choose>
+ <xsl:when test="name() = 'location'">WSDL </xsl:when>
+ <xsl:otherwise>Schema </xsl:otherwise>
+ </xsl:choose>
+ <i>
<xsl:value-of select="."/>
</i>
</a>
</h2>
- <div class="box">
- <xsl:apply-templates select="document(.)" mode="src"/>
- </div>
- <xsl:apply-templates select="/*/*[local-name() = 'import'][@location]/@location" mode="src.import"/>
- <xsl:apply-templates select="document(.)//xsd:import[@schemaLocation]/@schemaLocation" mode="src.import"/>
+ <div class="box">
+ <xsl:apply-templates select="document(string(.))" mode="src"/>
+ </div>
+
+ <xsl:apply-templates select="document(string(.))/*/*[local-name() = 'import'][@location]/@location" mode="src.import">
+ <xsl:with-param name="src.import.stack" select="$recursion.check"/>
+ </xsl:apply-templates>
+ <xsl:apply-templates select="document(string(.))//xsd:import[@schemaLocation]/@schemaLocation" mode="src.import">
+ <xsl:with-param name="src.import.stack" select="$recursion.check"/>
+ </xsl:apply-templates>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:template>
<xsl:template match="*" mode="src">
<div class="xml-element">
@@ -2034,12 +2065,12 @@
<xsl:choose>
<xsl:when test="count(/*/namespace::*) > 0">
- <!--
- When the namespace axis is present (e.g. Internet Explorer), we can simulate
- the namespace declarations by comparing the namespaces in scope on this element
- with those in scope on the parent element. Any difference must have been the
- result of a namespace declaration. Note that this doesn't reflect the actual
- source - it will strip out redundant namespace declarations.
+ <!--
+ When the namespace axis is present (e.g. Internet Explorer), we can simulate
+ the namespace declarations by comparing the namespaces in scope on this element
+ with those in scope on the parent element. Any difference must have been the
+ result of a namespace declaration. Note that this doesn't reflect the actual
+ source - it will strip out redundant namespace declarations.
-->
<xsl:for-each select="namespace::*[. != 'http://www.w3.org/XML/1998/namespace']">
<xsl:if test="not($current/parent::*[namespace::*[. = current()]])">
@@ -2055,15 +2086,15 @@
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
- <!--
- When the namespace axis isn't supported (e.g. Mozilla), we can simulate
- appropriate declarations from namespace elements.
- This currently doesn't check for namespaces on attributes.
- In the general case we can't reliably detect the use of QNames in content, but
- in the case of schema, we know which content could contain a QName and look
- there too. This mechanism is rather unpleasant though, since it records
- namespaces where they are used rather than showing where they are declared
- (on some parent element) in the source. Yukk!
+ <!--
+ When the namespace axis isn't supported (e.g. Mozilla), we can simulate
+ appropriate declarations from namespace elements.
+ This currently doesn't check for namespaces on attributes.
+ In the general case we can't reliably detect the use of QNames in content, but
+ in the case of schema, we know which content could contain a QName and look
+ there too. This mechanism is rather unpleasant though, since it records
+ namespaces where they are used rather than showing where they are declared
+ (on some parent element) in the source. Yukk!
-->
<xsl:if test="namespace-uri(.) != namespace-uri(parent::*) or not(parent::*)">
<span class="xml-att">
@@ -2103,20 +2134,20 @@
</div>
</xsl:template>
-<!--
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- End of included transformation: wsdl-viewer-src.xsl
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+<!--
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+ End of included transformation: wsdl-viewer-src.xsl
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-->
-<!--
-==================================================================
- Starting point
-==================================================================
+<!--
+==================================================================
+ Starting point
+==================================================================
-->
<xsl:template match="/">
@@ -2128,10 +2159,10 @@
-<!--
-==================================================================
- Rendering: HTML head
-==================================================================
+<!--
+==================================================================
+ Rendering: HTML head
+==================================================================
-->
<xsl:template name="head.render">
@@ -2161,10 +2192,10 @@
-<!--
-==================================================================
- Rendering: HTML body
-==================================================================
+<!--
+==================================================================
+ Rendering: HTML body
+==================================================================
-->
<xsl:template name="body.render">
@@ -2174,8 +2205,8 @@
<xsl:call-template name="title.render"/>
-<!-- TODO: pages with tabs for selecting some aspect of the WSDL
- <xsl:call-template name="navig.render"/>
+<!-- TODO: pages with tabs for selecting some aspect of the WSDL
+ <xsl:call-template name="navig.render"/>
-->
<xsl:call-template name="content.render"/>
@@ -2187,10 +2218,10 @@
-<!--
-==================================================================
- Rendering: heading
-==================================================================
+<!--
+==================================================================
+ Rendering: heading
+==================================================================
-->
<xsl:template name="title.render">
@@ -2203,10 +2234,10 @@
-<!--
-==================================================================
- Rendering: navigation
-==================================================================
+<!--
+==================================================================
+ Rendering: navigation
+==================================================================
-->
<xsl:template name="navig.render">
@@ -2224,7 +2255,7 @@
</li>
-<!-- <li id="nav-client"><a href="#TODO-1">Client</a></li>
+<!-- <li id="nav-client"><a href="#TODO-1">Client</a></li>
-->
<li id="nav-about">
@@ -2237,10 +2268,10 @@
-<!--
-==================================================================
- Rendering: content
-==================================================================
+<!--
+==================================================================
+ Rendering: content
+==================================================================
-->
<xsl:template name="content.render">
@@ -2256,7 +2287,7 @@
</xsl:if>
<xsl:if test="$ENABLE-ABOUT-PARAGRAPH">
<xsl:call-template name="about.render">
- <xsl:with-param name="version">3.1.00</xsl:with-param>
+ <xsl:with-param name="version" select="$wsdl-viewer.version"/>
</xsl:call-template>
</xsl:if>
</div>
@@ -2264,10 +2295,10 @@
-<!--
-==================================================================
- Rendering: footer
-==================================================================
+<!--
+==================================================================
+ Rendering: footer
+==================================================================
-->
<xsl:template name="footer.render">
@@ -2278,10 +2309,10 @@
-<!--
-==================================================================
- Rendering: WSDL service information
-==================================================================
+<!--
+==================================================================
+ Rendering: WSDL service information
+==================================================================
-->
<xsl:template name="service.render">
@@ -2306,10 +2337,10 @@
-<!--
-==================================================================
- Rendering: WSDL operations - detail
-==================================================================
+<!--
+==================================================================
+ Rendering: WSDL operations - detail
+==================================================================
-->
<xsl:template name="operations.render">
@@ -2351,10 +2382,10 @@
-<!--
-==================================================================
- Rendering: WSDL and XSD source code files
-==================================================================
+<!--
+==================================================================
+ Rendering: WSDL and XSD source code files
+==================================================================
-->
<xsl:template name="src.render">
@@ -2370,16 +2401,16 @@
</div>
<xsl:apply-templates select="/*/*[local-name() = 'import'][@location]/@location" mode="src.import"/>
- <xsl:apply-templates select="$global.types//xsd:import[@schemaLocation]/@schemaLocation | $global.types//xsd:include[@schemaLocation]/@schemaLocation" mode="src.import"/>
+ <xsl:apply-templates select="$consolidated-wsdl/*[local-name() = 'types']//xsd:import[@schemaLocation]/@schemaLocation | $consolidated-wsdl/*[local-name() = 'types']//xsd:include[@schemaLocation]/@schemaLocation" mode="src.import"/>
</div>
</xsl:template>
-<!--
-==================================================================
- Rendering: About
-==================================================================
+<!--
+==================================================================
+ Rendering: About
+==================================================================
-->
<xsl:template name="about.render">
---------------------------------------------------------------------
To unsubscribe, e-mail: woden-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: woden-dev-help@ws.apache.org