You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by st...@apache.org on 2004/12/17 19:52:07 UTC

svn commit: r122665 - /incubator/beehive/trunk/docs/tools /incubator/beehive/trunk/docs/tools/xslt /incubator/beehive/trunk/docs/tools/xslt/config_ref.xslt

Author: steveh
Date: Fri Dec 17 10:52:06 2004
New Revision: 122665

URL: http://svn.apache.org/viewcvs?view=rev&rev=122665
Log:
A XSLT style sheet for generating reference docs from XSD files.
Creates Forrest XML from imbedded doc text in the schema XSD file.
Added:
   incubator/beehive/trunk/docs/tools/
   incubator/beehive/trunk/docs/tools/xslt/
   incubator/beehive/trunk/docs/tools/xslt/config_ref.xslt

Added: incubator/beehive/trunk/docs/tools/xslt/config_ref.xslt
Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/docs/tools/xslt/config_ref.xslt?view=auto&rev=122665
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/docs/tools/xslt/config_ref.xslt	Fri Dec 17 10:52:06 2004
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+ <!DOCTYPE xsl:stylesheet [ 
+    <!ENTITY nbsp "&#160;">   <!-- white space in XSL -->
+    ]> 
+<xsl:stylesheet version="1.0" 
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+  xmlns:ref="http://www.w3.org/2001/XMLSchema">
+	<!--<xsl:preserve-space elements="*"/>-->
+	<xsl:output doctype-public="-//APACHE//DTD Documentation V1.2//EN" doctype-system="http://forrest.apache.org/dtd/document-v13.dtd"/>
+
+    <xsl:template match="/">  
+
+		<document>
+		    <header>
+		        <title>Reference Documentation: <xsl:value-of select="ref:schema/ref:element/@name"/>.xml File</title>
+		    </header>
+		    <body>
+		        <!-- ############### Description Section ################-->
+		        <xsl:for-each select="//ref:annotation">
+		            <xsl:if test="@id = 'description'">
+		            	<p><xsl:value-of select="ref:documentation"/></p>
+		            </xsl:if>
+	            </xsl:for-each>
+		        <!-- ############### Elements Section ################-->
+		        <xsl:for-each select="//ref:element">
+		        	<xsl:sort select="@name"/>
+		        	<section>
+		        	    <title><xsl:value-of select="@name"/></title>
+		        	    <p><xsl:value-of select="ref:annotation/ref:documentation"/></p>
+		        	</section>
+		        	
+				</xsl:for-each>
+		        <!-- ############### Example Section ################-->
+		        <xsl:for-each select="//ref:annotation">
+		            <xsl:if test="@id = 'example'">
+		            	<p><xsl:value-of select="ref:documentation"/></p>
+		            </xsl:if>
+	            </xsl:for-each>
+		    </body>
+		</document>
+
+
+	</xsl:template>
+
+
+</xsl:stylesheet>