1 |
3032
|
perry
|
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
|
|
<xsl:stylesheet version="1.0"
|
3 |
|
|
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
4 |
|
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
5 |
|
|
xmlns:out="http://www.w3.org/dummyXSL" >
|
6 |
|
|
|
7 |
|
|
<!--
|
8 |
|
|
Description: Generate the component register from the config XML schema.
|
9 |
|
|
Author: Mike Adair
|
10 |
|
|
Licence: LGPL as per: http://www.gnu.org/copyleft/lesser.html
|
11 |
|
|
|
12 |
4307
|
leinfelder
|
$Id: ObjectDetails.xsl 2546 2007-01-23 12:07:39Z gjvoosten $
|
13 |
3032
|
perry
|
-->
|
14 |
|
|
|
15 |
|
|
<xsl:output method="xml" encoding="utf-8" indent="yes"/>
|
16 |
4307
|
leinfelder
|
<xsl:param name="objectType">AoiMouseHandlerType</xsl:param>
|
17 |
3032
|
perry
|
<xsl:variable name="docRoot" select="/xs:schema"/>
|
18 |
|
|
|
19 |
|
|
<xsl:template match="/xs:schema">
|
20 |
|
|
<dl>
|
21 |
|
|
<h3><xsl:value-of select="$objectType"/></h3>
|
22 |
|
|
<xsl:apply-templates select="xs:complexType[@name=$objectType]"/>
|
23 |
|
|
</dl>
|
24 |
|
|
</xsl:template>
|
25 |
|
|
|
26 |
|
|
<xsl:template match="xs:complexType">
|
27 |
|
|
<xsl:apply-templates select="xs:sequence/xs:element"/>
|
28 |
|
|
<xsl:apply-templates select="xs:complexContent/xs:extension"/>
|
29 |
|
|
</xsl:template>
|
30 |
|
|
|
31 |
|
|
<xsl:template match="xs:extension">
|
32 |
|
|
<xsl:param name="objectType" select="substring-after(@base,':')"/>
|
33 |
|
|
<xsl:apply-templates select="xs:sequence/xs:element"/>
|
34 |
|
|
<xsl:apply-templates select="$docRoot/xs:complexType[@name=$objectType]"/>
|
35 |
|
|
</xsl:template>
|
36 |
|
|
|
37 |
|
|
<xsl:template match="xs:element">
|
38 |
|
|
<dt><xsl:value-of select="@name"/> (<xsl:value-of select="@type"/>)</dt>
|
39 |
|
|
<dd><xsl:value-of select="xs:annotation/xs:documentation"/></dd>
|
40 |
|
|
</xsl:template>
|
41 |
|
|
|
42 |
|
|
<xsl:template match="text()|@*"/>
|
43 |
|
|
|
44 |
|
|
</xsl:stylesheet>
|
45 |
|
|
|