Changeset 25767 for documentation/trunk


Ignore:
Timestamp:
06/06/12 16:22:23 (9 years ago)
Author:
ak19
Message:

Processing of the MajorVersion element is moved into a separate preprocessing pass, in order to ensure that NumberedItems nested in a MajorVersion element continue to have the right numbering on display.

Location:
documentation/trunk/tutorials
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • documentation/trunk/tutorials/generate-html.sh

    r25472 r25767  
    1919processing_dir=`pwd`/processing
    2020output_dir=`pwd`/html
     21tmp_dir=`pwd`/tmp
    2122
    2223export CLASSPATH=$shared_dir:$GSDLHOME/gli:$GSDLHOME/gli/classes:$GSDLHOME/perllib:$shared_dir/xalan.jar
     
    2627fi
    2728
     29if [ ! -d $tmp_dir ]; then
     30    mkdir $tmp_dir
     31fi
     32
    2833langs="en fr es ru"
    2934
     
    3136# is on the difference between $@ and $* and when to add quotes around them
    3237
     38# preprocess-tut-xml.xsl removes all the non-matching MajorVersion tags first
     39# This needs to be done in a separate pass, to ensure NumberedItems nested in
     40# MajorVersion tags preserve their numbering.
     41
    3342echo "processing top level index"
    34 java -DGSDLHOME=$GSDLHOME ApplyXSLT "en" $processing_dir/xml-to-top-index.xsl  $source_dir/tutorial_en.xml "$@" > $output_dir/index.html
     43java -DGSDLHOME=$GSDLHOME ApplyXSLT "en" $processing_dir/preprocess-tut-xml.xsl  $source_dir/tutorial_en.xml "$@" > $tmp_dir/tutorial_en.xml
     44java -DGSDLHOME=$GSDLHOME ApplyXSLT "en" $processing_dir/xml-to-top-index.xsl  $tmp_dir/tutorial_en.xml "$@" > $output_dir/index.html
    3545
    3646echo "generating wiki index page"
    37 java -DGSDLHOME=$GSDLHOME ApplyXSLT "en" $processing_dir/xml-to-wiki-index.xsl $source_dir/tutorial_en.xml "$@" > $output_dir/wiki-index.txt
     47java -DGSDLHOME=$GSDLHOME ApplyXSLT "en" $processing_dir/xml-to-wiki-index.xsl $tmp_dir/tutorial_en.xml "$@" > $output_dir/wiki-index.txt
    3848
    3949for l in $langs; do
     
    4353    fi
    4454    cd $output_dir/$l
    45     java -DGSDLHOME=$GSDLHOME ApplyXSLT $l $processing_dir/xml-to-index.xsl $source_dir/tutorial_$l.xml "$@" > index.html
    46     java -DGSDLHOME=$GSDLHOME ApplyXSLT $l $processing_dir/xml-to-one-html.xsl $source_dir/tutorial_$l.xml "$@" > all_tutorials.html
    47     java -DGSDLHOME=$GSDLHOME ApplyXSLT $l $processing_dir/xml-to-many-html.xsl $source_dir/tutorial_$l.xml "$@" | perl -S $GSDLHOME/gli/help/splithelpdocument.pl
     55
     56    if [ "$l" != "en" ]; then
     57    java -DGSDLHOME=$GSDLHOME ApplyXSLT $l $processing_dir/preprocess-tut-xml.xsl $source_dir/tutorial_$l.xml "$@" > $tmp_dir/tutorial_$l.xml
     58    fi
     59    java -DGSDLHOME=$GSDLHOME ApplyXSLT $l $processing_dir/xml-to-index.xsl $tmp_dir/tutorial_$l.xml "$@" > index.html
     60    java -DGSDLHOME=$GSDLHOME ApplyXSLT $l $processing_dir/xml-to-one-html.xsl $tmp_dir/tutorial_$l.xml "$@" > all_tutorials.html
     61    java -DGSDLHOME=$GSDLHOME ApplyXSLT $l $processing_dir/xml-to-many-html.xsl $tmp_dir/tutorial_$l.xml "$@" | perl -S $GSDLHOME/gli/help/splithelpdocument.pl
    4862    cd $top_dir
    4963done
    5064
    51 
    52 
     65# get rid of intermediary directory
     66rm -rf $tmp_dir
Note: See TracChangeset for help on using the changeset viewer.