From: <xm...@us...> - 2006-08-26 09:48:14
|
Revision: 6204 Author: xmldoc Date: 2006-08-26 02:47:55 -0700 (Sat, 26 Aug 2006) ViewCVS: http://svn.sourceforge.net/docbook/?rev=6204&view=rev Log Message: ----------- Added Makefile.paramDoc file, for creating versions of param.xsl files with doc embedded. Added Paths: ----------- trunk/xsl/tools/make/Makefile.paramDoc Added: trunk/xsl/tools/make/Makefile.paramDoc =================================================================== --- trunk/xsl/tools/make/Makefile.paramDoc (rev 0) +++ trunk/xsl/tools/make/Makefile.paramDoc 2006-08-26 09:47:55 UTC (rev 6204) @@ -0,0 +1,53 @@ +# $Source$ +# $Author$ +# $Date$ +# $Revision$ +# vim: number +# +# ------------------------------------------------------------------ +# ** Makefile.paramDoc - create param.xsl files w/ embedded doc ** +# ------------------------------------------------------------------ + +PARAMFILES = $(wildcard ../../*/param.xsl) +PARAMFILESDOCD = $(foreach base,$(basename $(PARAMFILES)),$(base).docd.xsl) + +XSLT=xsltproc +XSLTFLAGS= + +COPYDOC := <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" \ + xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" \ + version="1.0"> \ + <xsl:template match="*[local-name() = 'param']"> \ + <xsl:variable \ + name="source" \ + select="concat('../../params/',@name,'.xml')"/> \ + <xsl:apply-templates select="document($$source)/refentry"/> \ + <xsl:copy> \ + <xsl:apply-templates select="@* | node()"/> \ + </xsl:copy> \ + </xsl:template> \ + <xsl:template match="node() | @*"> \ + <xsl:copy> \ + <xsl:apply-templates select="@* | node()"/> \ + </xsl:copy> \ + </xsl:template> \ + <xsl:template match="refentry"> \ + <xsl:text>&\#x0a;</xsl:text> \ + <doc:refentry id="{@id}"> \ + <xsl:apply-templates/> \ + </doc:refentry> \ + <xsl:text>&\#x0a;</xsl:text> \ + </xsl:template> \ + <xsl:template match="refsynopsisdiv"/> \ +</xsl:stylesheet> + +all: $(PARAMFILESDOCD) + +%.docd.xsl: %.xsl + echo '$(COPYDOC)' | $(XSLT) $(XSLTFLAGS) - $< > $@ + +debug: + @echo $(PARAMFILESDOCD) + +clean: + $(RM) $(PARAMFILESDOCD) Property changes on: trunk/xsl/tools/make/Makefile.paramDoc ___________________________________________________________________ Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |