From: Michael Smith Date: Wed, 5 Apr 2006 05:18:29 +0000 (+0000) Subject: Added mechanism for dynamically generating docbook-elements.xsl X-Git-Tag: release/1.79.1~6^2~2926 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3ec14962372a4983e1de20d7b6b462da9d357d98;p=docbook-dsssl Added mechanism for dynamically generating docbook-elements.xsl file (current list of DocBook elements, generated from current DocBook 5 .rng file in source repository). So removed static docbook-elements.xsl file from source control. Also removed make-xsl-params.pl Perl script and replaced it with make-elements.xsl, an XSL stylesheet that does the same thing the Perl script did (dymanically generate a list of DocBook XSL stylesheet params). --- diff --git a/xsl/docsrc/.cvsignore b/xsl/docsrc/.cvsignore index 79cc3a4af..5befc41e4 100644 --- a/xsl/docsrc/.cvsignore +++ b/xsl/docsrc/.cvsignore @@ -1 +1,2 @@ xsl-params.xsl +docbook-elements.xsl diff --git a/xsl/docsrc/Makefile b/xsl/docsrc/Makefile index 0fff632f2..497e4ae6e 100644 --- a/xsl/docsrc/Makefile +++ b/xsl/docsrc/Makefile @@ -1,6 +1,14 @@ +include ../../cvstools/Makefile.incl DIRS=common refentry html fo manpages wordml slides/html website template tools pi -all: xsl-params.xsl +DOCBOOK5_RNG=../../docbook/relaxng/docbook/docbook.rng +PARAM_XSL_FILES=$(shell for file in $$(find . -name "param.xsl"); do \ + readlink -f $$file; done | grep -v xhtml) + +MAKE_ELEMENTS_XSL=make-elements.xsl +MAKE_PARAMS_XSL=make-xsl-params.xsl + +all: docbook-elements.xsl xsl-params.xsl for i in $(DIRS) __bogus__; do \ if [ $$i != __bogus__ ] ; then \ echo "$(MAKE) -C $$i"; $(MAKE) -C $$i; \ @@ -14,8 +22,15 @@ clean: fi \ done -xsl-params.xsl: make-xsl-params.pl - perl $< > $@ +$(DOCBOOK5_RNG): + $(MAKE) -C $(dir $@) $(notdir $@) + +docbook-elements.xsl: $(MAKE_ELEMENTS_XSL) $(DOCBOOK5_RNG) + $(XSLT) $(DOCBOOK5_RNG) $< $@ + +xsl-params.xsl: $(MAKE_PARAMS_XSL) $(PARAM_XSL_FILES) + $(XSLT) $< $< $@ realclean: clean - rm -f xsl-params.xsl + $(RM) docbook-elements.xsl + $(RM) xsl-params.xsl diff --git a/xsl/docsrc/docbook-elements.xsl b/xsl/docsrc/docbook-elements.xsl deleted file mode 100644 index 7dfc3d5c7..000000000 --- a/xsl/docsrc/docbook-elements.xsl +++ /dev/null @@ -1,419 +0,0 @@ - - - - - - abbrev - abstract - accel - ackno - acronym - action - address - affiliation - alt - anchor - answer - appendix - appendixinfo - application - area - areaset - areaspec - arg - article - articleinfo - artpagenums - attribution - audiodata - audioobject - author - authorblurb - authorgroup - authorinitials - beginpage - bibliocoverage - bibliodiv - biblioentry - bibliography - bibliographyinfo - biblioid - bibliomisc - bibliomixed - bibliomset - bibliorelation - biblioset - bibliosource - blockinfo - blockquote - book - bookinfo - bridgehead - callout - calloutlist - caption - caution - chapter - chapterinfo - citation - citebiblioid - citerefentry - citetitle - city - classname - classsynopsis - classsynopsisinfo - cmdsynopsis - co - collab - collabname - colophon - colspec - command - computeroutput - confdates - confgroup - confnum - confsponsor - conftitle - constant - constraint - constraintdef - constructorsynopsis - contractnum - contractsponsor - contrib - copyright - coref - corpauthor - corpname - country - database - date - dedication - destructorsynopsis - edition - editor - email - emphasis - entry - entrytbl - envar - epigraph - equation - errorcode - errorname - errortext - errortype - example - exceptionname - fax - fieldsynopsis - figure - filename - firstname - firstterm - footnote - footnoteref - foreignphrase - formalpara - funcdef - funcparams - funcprototype - funcsynopsis - funcsynopsisinfo - function - glossary - glossaryinfo - glossdef - glossdiv - glossentry - glosslist - glosssee - glossseealso - glossterm - graphic - graphicco - group - guibutton - guiicon - guilabel - guimenu - guimenuitem - guisubmenu - hardware - highlights - holder - honorific - imagedata - imageobject - imageobjectco - important - index - indexdiv - indexentry - indexinfo - indexterm - informalequation - informalexample - informalfigure - informaltable - initializer - inlineequation - inlinegraphic - inlinemediaobject - interface - interfacename - invpartnumber - isbn - issn - issuenum - itemizedlist - itermset - jobtitle - keycap - keycode - keycombo - keysym - keyword - keywordset - label - legalnotice - lhs - lineage - lineannotation - link - listitem - literal - literallayout - lot - lotentry - manvolnum - markup - medialabel - mediaobject - mediaobjectco - member - menuchoice - methodname - methodparam - methodsynopsis - modespec - modifier - mousebutton - msg - msgaud - msgentry - msgexplan - msginfo - msglevel - msgmain - msgorig - msgrel - msgset - msgsub - msgtext - nonterminal - note - objectinfo - olink - ooclass - ooexception - oointerface - option - optional - orderedlist - orgdiv - orgname - otheraddr - othercredit - othername - pagenums - para - paramdef - parameter - part - partinfo - partintro - personblurb - personname - phone - phrase - pob - postcode - preface - prefaceinfo - primary - primaryie - printhistory - procedure - production - productionrecap - productionset - productname - productnumber - programlisting - programlistingco - prompt - property - pubdate - publisher - publishername - pubsnumber - qandadiv - qandaentry - qandaset - question - quote - refclass - refdescriptor - refentry - refentryinfo - refentrytitle - reference - referenceinfo - refmeta - refmiscinfo - refname - refnamediv - refpurpose - refsect1 - refsect1info - refsect2 - refsect2info - refsect3 - refsect3info - refsection - refsectioninfo - refsynopsisdiv - refsynopsisdivinfo - releaseinfo - remark - replaceable - returnvalue - revdescription - revhistory - revision - revnumber - revremark - rhs - row - sbr - screen - screenco - screeninfo - screenshot - secondary - secondaryie - sect1 - sect1info - sect2 - sect2info - sect3 - sect3info - sect4 - sect4info - sect5 - sect5info - section - sectioninfo - see - seealso - seealsoie - seeie - seg - seglistitem - segmentedlist - segtitle - seriesvolnums - set - setindex - setindexinfo - setinfo - sgmltag - shortaffil - shortcut - sidebar - sidebarinfo - simpara - simplelist - simplemsgentry - simplesect - spanspec - state - step - street - structfield - structname - subject - subjectset - subjectterm - subscript - substeps - subtitle - superscript - surname - symbol - synopfragment - synopfragmentref - synopsis - systemitem - table - tbody - term - tertiary - tertiaryie - textdata - textobject - tfoot - tgroup - thead - tip - title - titleabbrev - toc - tocback - tocchap - tocentry - tocfront - toclevel1 - toclevel2 - toclevel3 - toclevel4 - toclevel5 - tocpart - token - trademark - type - ulink - userinput - varargs - variablelist - varlistentry - varname - videodata - videoobject - void - volumenum - warning - wordasword - xref - year - - - - - - - - - - 1 - 0 - - - - diff --git a/xsl/docsrc/make-elements.xsl b/xsl/docsrc/make-elements.xsl new file mode 100644 index 000000000..f15f442d4 --- /dev/null +++ b/xsl/docsrc/make-elements.xsl @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + * Do not edit this file. + + * It was generated automatically by the build. + + * Edit the make-elements.xsl file instead. + + + + + + + + + + + + + + + + + + 1 + 0 + + + + + + diff --git a/xsl/docsrc/make-xsl-params.pl b/xsl/docsrc/make-xsl-params.pl deleted file mode 100755 index af3ee74f2..000000000 --- a/xsl/docsrc/make-xsl-params.pl +++ /dev/null @@ -1,124 +0,0 @@ -#!/usr/bin/perl -- # -*- Perl -*- - -# Must be run from the "docssrc" directory - -print < - - - - - -EOF1 - -open (F, "../html/param.xsl"); -read (F, $_, -s "../html/param.xsl"); -close (F); -foreach my $param (/$1\n", -} - -print < - - - - -EOF2 - -open (F, "../fo/param.xsl"); -read (F, $_, -s "../fo/param.xsl"); -close (F); -foreach my $param (/$1\n", -} - -print < - - - - -EOF3 - -open (F, "../manpages/param.xsl"); -read (F, $_, -s "../manpages/param.xsl"); -close (F); -foreach my $param (/$1\n", -} - -print < - - - - -EOF5 - -open (F, "../wordml/param.xsl"); -read (F, $_, -s "../wordml/param.xsl"); -close (F); -foreach my $param (/$1\n", -} - -print < - - - - - - - - - - - - - - - 1 - 0 - - - - - - - - 1 - 0 - - - - - - - - 1 - 0 - - - - - - - - 1 - 0 - - - -EOF4 diff --git a/xsl/docsrc/make-xsl-params.xsl b/xsl/docsrc/make-xsl-params.xsl new file mode 100644 index 000000000..3f8e422a3 --- /dev/null +++ b/xsl/docsrc/make-xsl-params.xsl @@ -0,0 +1,136 @@ + + + + + + + + + + html fo manpages wordml + + + + + * Do not edit this file. + + * It was generated automatically by the build. + + * Edit the make-xsl-params.xsl file instead. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + 0 + + + + + + + + + + + + +