xsd-documentation.xsl

From canSAS
Revision as of 19:37, 25 January 2008 by Jemian (talk | contribs) (tool to extract the documentation from the XML Schema)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This XSL file is used to extract the documentation of the cansas1d standard from the cansas1d.xsd Schema.

<xsl:stylesheet version="1.0"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:cs="http://www.smallangles.net/cansas1d">

	<!-- http://www.w3schools.com/xsl/xsl_transformation.asp -->

	<xsl:strip-space elements="DT DD" />

	<xsl:template match="/">
		<html>
			<head>
				<title>
					Extracted documentation from canSAS 1-D XML Schema
				</title>
			</head>
			<body>
				<h1>
					Extracted documentation from canSAS 1-D XML Schema
				</h1>
				<DL>
				<xsl:apply-templates select="//xsd:documentation" />
				</DL>
			</body>
		</html>
	</xsl:template>

	<xsl:template match="xsd:documentation-html">
		<DT><xsl:value-of select="xsd:DT" /></DT>
		<DD><xsl:value-of select="xsd:DD" /></DD>
	</xsl:template>

	<xsl:template match="xsd:documentation">
		;<TT><xsl:value-of select="xsd:DT" /> </TT>:
		<xsl:value-of select="xsd:DD" /> <br /><br />
	</xsl:template>

</xsl:stylesheet>