]> granicus.if.org Git - docbook-dsssl/commitdiff
if source is an XML file, and this is jade, then also include the XML
authorAdam Di Carlo <adicarlo@users.sourceforge.net>
Thu, 19 Dec 2002 22:13:58 +0000 (22:13 +0000)
committerAdam Di Carlo <adicarlo@users.sourceforge.net>
Thu, 19 Dec 2002 22:13:58 +0000 (22:13 +0000)
declaration -- is that too clever by half?

emit the jade cmdline we'll be running

cvstools/runjade

index 7f45859c54f9308dd7f65672d0441a290142dc7d..8dadb476b33bfb97cc4ecf145a2859083b8bee22 100755 (executable)
@@ -29,4 +29,18 @@ if [ -f /share/doctypes/catalog ]; then
     CATALOGS="$CATALOGS -c /share/doctypes/catalog"
 fi
 
-exec $JADE $CATALOGS -t $FORMAT -d $DSSSL $* $SOURCE
+# if jade && file is XML, add the XML catalog
+if [ `basename $JADE` = jade ] && [ ${SOURCE%.xml} != $SOURCE ]; then
+  for file in /usr/share/sgml/declaration/xml.dcl \
+              /usr/share/sgml/declaration/xml.decl \
+              /usr/lib/sgml/declaration/xml.dcl \
+              /usr/lib/sgml/declaration/xml.decl ; do
+    if [ -f $file ]; then
+      DECL=$file
+      break
+    fi
+  done
+fi
+
+echo $JADE $CATALOGS -t $FORMAT -d $DSSSL $* $DECL $SOURCE
+exec $JADE $CATALOGS -t $FORMAT -d $DSSSL $* $DECL $SOURCE