cvs commit: LFS/newxml/contrib entResolver

matthew at linuxfromscratch.org matthew at linuxfromscratch.org
Wed Mar 24 13:24:39 PST 2004


matthew     04/03/24 14:24:39

  Modified:    newxml   Makefile README TODO
  Added:       newxml/contrib entResolver
  Removed:     newxml   entResolver
  Log:
  * (README): We now require libxml2-2.5.8 as it fixes bugs concerning entity
    resolution in XIncluded files, and attributes no longer get lost
    during XPointer range-to XIncludes.
  * (Makefile, contrib/entResolver): No longer need entResolver for processing the
    book.  Updated Makefile accordingly, and moved the script to the new contrib
    directory.
  * (TODO): Matts memory is lousy - updated to reflect recent list discussions and
    entries that have been dealt with by recent commits.
  
  Revision  Changes    Path
  1.8       +6 -8      LFS/newxml/Makefile
  
  Index: Makefile
  ===================================================================
  RCS file: /home/cvsroot/LFS/newxml/Makefile,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Makefile	16 Mar 2004 23:10:54 -0000	1.7
  +++ Makefile	24 Mar 2004 21:24:38 -0000	1.8
  @@ -1,14 +1,13 @@
   BASEDIR=~/lfs-book/
   
   lfs:
  -	bash entResolver output
  -	cd ../output && xsltproc --xinclude --nonet -stringparam base.dir \
  -	$(BASEDIR) stylesheets/lfs-chunked.xsl index.xml
  +	xsltproc --xinclude --nonet -stringparam base.dir $(BASEDIR) \
  +	  stylesheets/lfs-chunked.xsl index.xml
   
   	if [ ! -e $(BASEDIR)stylesheets ]; then \
   	  mkdir -p $(BASEDIR)stylesheets; \
   	fi;
  -	cp ../output/stylesheets/lfs.css $(BASEDIR)stylesheets
  +	cp stylesheets/lfs.css $(BASEDIR)stylesheets
   
   	if [ ! -e $(BASEDIR)images ]; then \
   	  mkdir -p $(BASEDIR)images; \
  @@ -21,7 +20,6 @@
   	  $(BASEDIR){index,part1,part2,part3,part4}.html
   
   pdf:
  -	bash entResolver output
  -	cd ../output && xsltproc --xinclude --nonet --output lfs.fo \
  -	  stylesheets/lfs-pdf.xsl index.xml
  -	cd ../output && fop.sh lfs.fo lfs.pdf
  +	xsltproc --xinclude --nonet --output lfs.fo stylesheets/lfs-pdf.xsl \
  +	  index.xml
  +	fop.sh lfs.fo lfs.pdf
  
  
  
  1.9       +1 -1      LFS/newxml/README
  
  Index: README
  ===================================================================
  RCS file: /home/cvsroot/LFS/newxml/README,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- README	11 Mar 2004 22:33:32 -0000	1.8
  +++ README	24 Mar 2004 21:24:38 -0000	1.9
  @@ -11,7 +11,7 @@
                                    which caused broken hyperlinks (they pointed to
                                    the wrong directory).
   
  -libxml2-2.6.7 & libxslt-1.1.4 - these releases have a couple of XInclude related
  +libxml2-2.6.8 & libxslt-1.1.5 - these releases have a couple of XInclude related
                                   bugfixes in them
   
   FOP-0.20.5 - required for PDF generation.  The easiest method of installation is
  
  
  
  1.8       +27 -19    LFS/newxml/TODO
  
  Index: TODO
  ===================================================================
  RCS file: /home/cvsroot/LFS/newxml/TODO,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- TODO	11 Mar 2004 22:33:32 -0000	1.7
  +++ TODO	24 Mar 2004 21:24:38 -0000	1.8
  @@ -4,30 +4,38 @@
   1. General
   ~~~~~~~~~~
   
  -1.1.  Decide on a validation method to use.  DTD's are not namespace aware
  -      which may cause us problems in the future.  RelaxNG looks promising but
  -      there's also the W3C's "XML Schema".  Docbook is available in both, and
  -      libxml2 supports both.
  +  1.1. Decide on a validation method to use.  DTD's are not namespace aware
  +       which cause us problems with XInclude namespaces, and will likely cause
  +       more problems in the future.  RelaxNG looks promising but there's also
  +       the W3C's "XML Schema".  Docbook is available in both, and libxml2
  +       supports both.  DocBook 5.0 appears as if it'll be primarily based on RNG
  +       so it would probably be better if we can migrate to that.
  +
  +       Note: Preliminary testing isn't going too well.  Validating against the
  +       4.3CR3 version of the Docbook RNG schema causes libxml2 to crash
  +       spectacularly (the process ends up getting killed!).  The 4.2 version
  +       seems better in that respect, but I can't seem to write a document that
  +       will validate against it.  All the documents I try complain that
  +       "<book> wasn't expected there" (line 1!).
  +  1.2. Upgrade to lfs-bootscripts-2.0
  +  1.3. Upgrade to file-4.08
  +  1.4. Merge Alex's structure and content changes
  +  1.5. Remove download location hyperlinks from chapters 5 & 6.
  +
   
   2. HTML
   ~~~~~~~
   
  -2.1. Provide a css file to provide nicer output than whatever the UA's default
  -     is.
  -       * Started - needs some comments regarding layout.
  -       * Binary/library names listed in "Short Description" sections should be
  -         in a fixed-width font.
  -       * URLs of "Official download locations" appear on the line below where
  -         they should do in chapter 6.
  -       * Header (naviagtion) areas, TOCs & "Titlepage" sections need font sizes
  -         & style fixing.
  -2.2. Decide whether we want to use the strict or transitional XHTML DTD. Note in
  -     particular http://www.sagehill.net/docbookxsl/OtherOutputForms.html#d0e23340.
  -2.3. The legalinfo page generates it's own hyperlink ("Legal Notice") but the
  -     current book has it linked to via the "Copyright" message above.  Does this
  -     matter?
  -2.4. Decide on what levels the TOCs should go down to.
  +  2.1. Decide whether we want to use the strict or transitional XHTML DTD. Note
  +       in particular http://www.sagehill.net/docbookxsl/OtherOutputForms.html#d0e23340.
  +  2.2. The legalinfo page generates it's own hyperlink ("Legal Notice") but the
  +       current book has it linked to via the "Copyright" message above.  Does
  +       this matter?
  +  2.3. Decide on what levels the TOCs should go down to.
          * Section elements now no longer have a TOC generated for them - the book         TOC remains unchanged as do the part and appendix level TOCs.
  +  2.4. Jeroen commented that the semantics of the HTML output are inaccurate. It
  +       looks as if it'll be too time consuming to get this fixed, but does at
  +       least warrant further investigation.
   
   3. PDF
   ~~~~~~
  
  
  
  1.1                  LFS/newxml/contrib/entResolver
  
  Index: entResolver
  ===================================================================
  #!/bin/bash
  ###############################################################################
  #                                                                             #
  # File:        entResolver                                                    #
  #                                                                             #
  # Description: Works around libxml2 bug 135713 by preprocessing entity        #
  #              references before performing any stylesheet processing.        #
  #                                                                             #
  # Author:      Manuel Canales Esparcia                                        #
  #                                                                             #
  ###############################################################################
  
  NAME=`basename "$0"`
  DESTDIR="$1"
  
  if [ -z "$1" ]; then
          echo "USAGE: $NAME destdir"
          exit
  fi
  
  mkdir -p ../"$DESTDIR"/chapter0{1,2,3,4,5,6,7,8,9}
  mkdir -p ../"$DESTDIR"/prologue
  mkdir -p ../"$DESTDIR"/appendix{a,b}
  
  for i in `find . -name "*.xml"`; do
          xmllint --nonet --noent "${i}" > ../"$DESTDIR"/"${i}";
  done
  
  cp -a stylesheets ../"$DESTDIR"
  
  
  



More information about the lfs-book mailing list