Selaa lähdekoodia

Modified the xs3p stylesheet to look for parameter values in the focus.

Sascha Zelzer 13 vuotta sitten
vanhempi
commit
c4564e5585

+ 11 - 1
Libs/CommandLineModules/Core/Resources/ctkCmdLineModule.xsd

@@ -1,7 +1,17 @@
 <?xml version="1.0"?>
 <?xml-stylesheet type="text/xsl" href="xs3p.xsl"?>
 
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+            xmlns:xs3p="http://titanium.dstc.edu.au/xml/xs3p">
+
+  <xsd:annotation>
+    <xsd:appinfo source="http://www.commontk.org/docs/html/CommandLineModules_Page.html">
+      <xs3p:title>CTK XML schema for command line modules.</xs3p:title>
+      <xs3p:printGlossary>false</xs3p:printGlossary>
+      <xs3p:printLegend>false</xs3p:printLegend>
+    </xsd:appinfo>
+    <xsd:documentation>The XML schema for the XML description of command line module parameters.</xsd:documentation>
+  </xsd:annotation>
 
   <!--
   ===================================================================

+ 4 - 3
Libs/CommandLineModules/Documentation/xs3p.xsl

@@ -91,6 +91,7 @@
  xmlns:html="http://www.w3.org/1999/xhtml" 
  xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
  xmlns:ppp="http://titanium.dstc.edu.au/xml/xs3p" 
+ xmlns:xs3p="http://titanium.dstc.edu.au/xml/xs3p"
  version="1.0" 
  exclude-result-prefixes="xsd ppp html">
 
@@ -114,7 +115,7 @@
    <!-- ******** Global Parameters ******** -->
 
    <!-- Title of XHTML document. -->
-   <xsl:param name="title"></xsl:param>
+   <xsl:param name="title" select="/xsd:schema/xsd:annotation/xsd:appinfo/xs3p:title"></xsl:param>
 
    <!-- If 'true', sorts the top-level schema components by type, 
         then name. Otherwise, displays the components by the order that 
@@ -140,10 +141,10 @@
    <xsl:param name="printAllSubTypes">true</xsl:param>
 
    <!-- If 'true', prints out the Glossary section. -->
-   <xsl:param name="printGlossary">true</xsl:param>
+   <xsl:param name="printGlossary" select="/xsd:schema/xsd:annotation/xsd:appinfo/xs3p:printGlossary">true</xsl:param>
 
    <!-- If 'true', prints out the Legend section. -->
-   <xsl:param name="printLegend">true</xsl:param>
+   <xsl:param name="printLegend"  select="/xsd:schema/xsd:annotation/xsd:appinfo/xs3p:printLegend">true</xsl:param>
 
    <!-- If 'true', prints prefix matching namespace of schema
         components in XML Instance Representation tables. -->