aboutsummaryrefslogtreecommitdiff
path: root/spec/xs3p/examples/test_xsltproc.sh
blob: f2e3120a4080bbec8bf1ed4a1d01c2262c474d40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!bin/bash
RESULTS_DIR=xsltproc-results
LINKS_FILE=links.xml
XSLT_FILE=xs3p.xsl
ORIGINAL_XSLT_FILE=../$XSLT_FILE
#    Copy XSLT file to local directory
cp $ORIGINAL_XSLT_FILE .
#    Create results directory
if [ ! -d $RESULTS_DIR ] ;
then
  mkdir $RESULTS_DIR
fi
#    Loop through schema files
for f in *.xsd
do
  echo "Generating documentation for: $f"
  xsltproc --nonet --output $RESULTS_DIR/$f.html $XSLT_FILE $f
done
#    Test external links
# XSD_FILE=address.xsd
# echo "Generating documentation for: $XSD_FILE"
# xsltproc --nonet --output $RESULTS_DIR/$XSD_FILE.html $XSLT_FILE $XSD_FILE
# XSD_FILE=ipo.xsd
# echo "Generating documentation for: $XSD_FILE"
# xsltproc --param searchIncludedSchemas "'true'" --param linksFile "'links.xml'" --nonet --output $RESULTS_DIR/$XSD_FILE.html $XSLT_FILE $XSD_FILE
# XSD_FILE=report.xsd
# echo "Generating documentation for: $XSD_FILE"
# xsltproc --param searchIncludedSchemas "'true'" --param linksFile "'links.xml'" --nonet --output $RESULTS_DIR/$XSD_FILE.html $XSLT_FILE $XSD_FILE
#    Delete local copy of stylesheet
rm $XSLT_FILE