xsddoc/src/net/sf/xframe/xsddoc/xslt component.xsl, 1.31, 1.32 xml2html.xsl, 1.40, 1.41

Kurt Riede <[email protected]> Thu, 25 Oct 2007 23:50:33 +0000
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-cvs10.sourceforge.net:/tmp/cvs-serv1355/src/net/sf/xframe/xsddoc/xslt

Modified Files:
	component.xsl xml2html.xsl 
Log Message:
applied patch [1639999] xsddoc: Display source file name

Index: xml2html.xsl
===================================================================
RCS file: /cvsroot/xframe/xsddoc/src/net/sf/xframe/xsddoc/xslt/xml2html.xsl,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -d -r1.40 -r1.41
*** xml2html.xsl	24 Nov 2006 20:52:29 -0000	1.40
--- xml2html.xsl	25 Oct 2007 23:50:31 -0000	1.41
***************
*** 1722,1726 ****
      <a name="source"/>
      <dl>
!       <dt>Source</dt>
        <dd>
          <xsl:copy-of select="*"/>
--- 1722,1732 ----
      <a name="source"/>
      <dl>
!       <dt>Source (from
!           <tt>
!             <xsl:call-template name="source-location">
!               <xsl:with-param name="source" select="@from" />
!             </xsl:call-template>
!           </tt>)
!       </dt>
        <dd>
          <xsl:copy-of select="*"/>
***************
*** 1729,1732 ****
--- 1735,1761 ----
    </xsl:template>
    <!--
+     Source URL or file name containing the documented schema element. 
+     If the element came from a file, don't output the directory path
+     since it probably won't be meaningful.
+   -->
+   <xsl:template name="source-location">
+     <xsl:param name="source" />
+     <xsl:choose>
+       <xsl:when test="substring-after($source, '://') = ''
+           or substring-after($source, 'file://') != '' " >
+         <xsl:variable name="normalized-source" 
+             select="translate($source,'\','/')" />
+         <xsl:call-template name="last-substring">
+           <xsl:with-param name="string" select="$normalized-source" />
+           <xsl:with-param name="substring" select="'/'" />
+         </xsl:call-template>
+       </xsl:when>
+       <xsl:otherwise>
+         <xsl:value-of select="$source" />
+       </xsl:otherwise>
+     </xsl:choose>
+   </xsl:template>
+   
+   <!--
      Format documentation as a short abstract (upto the first dot).
      If there is xhtml or other unknown XML inside, pass-thru this XML for later formatting.

Index: component.xsl
===================================================================
RCS file: /cvsroot/xframe/xsddoc/src/net/sf/xframe/xsddoc/xslt/component.xsl,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** component.xsl	24 Nov 2006 20:52:29 -0000	1.31
--- component.xsl	25 Oct 2007 23:50:31 -0000	1.32
***************
*** 43,49 ****
    <xsl:include href="util.xsl"/>
    <!--
!     The location of the schema to extract from.
    -->
!   <xsl:param name="schemaLocation" select="'S:\BEA\XML\xsddoc\samples\stress\stress.xsd'"/>
    <!--
     Descriptive name of the schema.
--- 43,53 ----
    <xsl:include href="util.xsl"/>
    <!--
!     The location of the top-level schema.
    -->
!   <xsl:param name="schemaLocation" />
!   <!--
!     The location of the current schema.
!   -->
!   <xsl:param name="source" />
    <!--
     Descriptive name of the schema.
***************
*** 258,262 ****
        </xsl:if>
        <xsl:apply-templates select="." mode="collectDocs"/>
!       <doc:source>
          <xsl:apply-templates select="." mode="xmldoc">
            <xsl:with-param name="children" select="*"/>
--- 262,266 ----
        </xsl:if>
        <xsl:apply-templates select="." mode="collectDocs"/>
!       <doc:source from="{$source}">
          <xsl:apply-templates select="." mode="xmldoc">
            <xsl:with-param name="children" select="*"/>


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/