]> granicus.if.org Git - docbook-dsssl/commitdiff
Updated Makefile.docParam to handle current db5-namespaced param
authorMichael Smith <xmldoc@users.sourceforge.net>
Fri, 23 Mar 2007 21:57:22 +0000 (21:57 +0000)
committerMichael Smith <xmldoc@users.sourceforge.net>
Fri, 23 Mar 2007 21:57:22 +0000 (21:57 +0000)
source. Also added support for it to copy xsl:attribute-set along
with xsl:param (neglected to have it doing that previously...)
Note that the Makefile.docParam makefile generates copies of the
html/param.xsl, fo/param.xsl, etc. files with the documentation
embedded. It was originally intended for use with oXygen XML
Editor (because oXygen has the capability to parse out that
embedded doc and display it in the oXygen UI) but could be useful
for other purposes.

xsl/tools/make/Makefile.docParam

index fea004be30dd8bb1b94df19633acfa913308510d..65285f1513af974248ecfad8150ae41f5459000f 100644 (file)
@@ -15,13 +15,19 @@ XSLT=xsltproc
 XSLTFLAGS=
 
 COPYDOC := <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" \
-                xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" \
+                xmlns:doc="http://docbook.org/ns/docbook" \
                 version="1.0"> \
   <xsl:template match="*[local-name() = &apos;param&apos;]"> \
+    <xsl:call-template name="copy-xsl-source"/> \
+  </xsl:template> \
+  <xsl:template match="*[local-name() = &apos;attribute-set&apos;]"> \
+    <xsl:call-template name="copy-xsl-source"/> \
+  </xsl:template> \
+  <xsl:template name="copy-xsl-source"> \
     <xsl:variable \
         name="source" \
         select="concat(&apos;../../params/&apos;,@name,&apos;.xml&apos;)"/> \
-    <xsl:apply-templates select="document($$source)/refentry"/> \
+    <xsl:apply-templates select="document($$source)/*[local-name() = &apos;refentry&apos;]"/> \
     <xsl:copy> \
       <xsl:apply-templates select="@* | node()"/> \
     </xsl:copy> \
@@ -31,14 +37,14 @@ COPYDOC := <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" \
       <xsl:apply-templates select="@* | node()"/> \
     </xsl:copy> \
   </xsl:template> \
-  <xsl:template match="refentry"> \
+  <xsl:template match="*[local-name() = &apos;refentry&apos;]"> \
     <xsl:text>&\#x0a;</xsl:text> \
-    <doc:refentry id="{@id}"> \
+    <doc:refentry id="{@*[local-name() = &apos;id&apos;]}"> \
       <xsl:apply-templates/> \
     </doc:refentry> \
     <xsl:text>&\#x0a;</xsl:text> \
   </xsl:template> \
-  <xsl:template match="refsynopsisdiv"/> \
+  <xsl:template match="*[local-name() = &apos;refsynopsisdiv&apos;]"/> \
 </xsl:stylesheet>
 
 all: $(PARAMFILESDOCD)