xsddoc/src/net/sf/xframe/xsddoc/xslt overview-namespace.xsl,1.9,1.10
Kurt Riede <[email protected]>
| Newsgroups | gmane.text.xml.xframe.xsddoc.devel |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/xframe/xsddoc/src/net/sf/xframe/xsddoc/xslt
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2733/src/net/sf/xframe/xsddoc/xslt
Modified Files:
overview-namespace.xsl
Log Message:
generate links for nested element declarations
Index: overview-namespace.xsl
===================================================================
RCS file: /cvsroot/xframe/xsddoc/src/net/sf/xframe/xsddoc/xslt/overview-namespace.xsl,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** overview-namespace.xsl 25 Jun 2004 17:54:21 -0000 1.9
--- overview-namespace.xsl 30 Aug 2004 07:14:02 -0000 1.10
***************
*** 57,62 ****
<!--
Processing the schema tag, the root element of a schema.
- todo change to intermediate XML format
- todo also recurse included schemas
-->
<xsl:template match="xs:schema">
--- 57,60 ----
***************
*** 84,87 ****
--- 82,90 ----
<xsl:with-param name="ignore" select="$ignore"/>
</xsl:apply-templates>
+ <xsl:for-each select="xs:element | xs:complexType">
+ <xsl:apply-templates select=".//xs:element[(not (@ref)) and (not (@type))]" mode="doc">
+ <xsl:with-param name="ignore" select="$ignore"/>
+ </xsl:apply-templates>
+ </xsl:for-each>
<xsl:for-each select="xs:include | xs:redefine">
<xsl:variable name="redefinedComponents">
***************
*** 104,110 ****
<xsl:param name="ignore"/>
<xsl:if test="not(contains($ignore, concat('|', local-name(), ':', @name, '|')))">
! <doc:component type="{local-name()}" name="{@name}" href="">
<xsl:attribute name="href">
! <xsl:value-of select="concat(local-name(), '/', @name, '.html')"/>
</xsl:attribute>
</doc:component>
--- 107,129 ----
<xsl:param name="ignore"/>
<xsl:if test="not(contains($ignore, concat('|', local-name(), ':', @name, '|')))">
! <xsl:variable name="hierarchy">
! <xsl:apply-templates select=".." mode="parent"/>
! </xsl:variable>
! <xsl:variable name="name">
! <xsl:choose>
! <xsl:when test="string($hierarchy) != ''">
! <xsl:value-of select="concat(string($hierarchy), @name)"/>
! </xsl:when>
! <xsl:otherwise>
! <xsl:value-of select="@name"/>
! </xsl:otherwise>
! </xsl:choose>
! </xsl:variable>
! <doc:component type="{local-name()}">
! <xsl:attribute name="name">
! <xsl:value-of select="$name"/>
! </xsl:attribute>
<xsl:attribute name="href">
! <xsl:value-of select="concat(local-name(), '/', $name, '.html')"/>
</xsl:attribute>
</doc:component>
***************
*** 113,116 ****
--- 132,159 ----
<!--
-->
+ <xsl:template match="*" mode="parent">
+ <xsl:param name="parent"/>
+ <xsl:choose>
+ <xsl:when test="local-name() = 'schema'">
+ <xsl:value-of select="$parent"/>
+ </xsl:when>
+ <xsl:when test="@name">
+ <xsl:apply-templates select=".." mode="parent">
+ <xsl:with-param name="parent">
+ <xsl:value-of select="@name"/>
+ <xsl:text>.</xsl:text>
+ <xsl:value-of select="$parent"/>
+ </xsl:with-param>
+ </xsl:apply-templates>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select=".." mode="parent">
+ <xsl:with-param name="parent" select="$parent"/>
+ </xsl:apply-templates>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+ <!--
+ -->
<xsl:template name="tostring">
<xsl:param name="nodes"/>
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click