--with-dtd, --with-dsssl
authorAdam Dickmeiss <adam@indexdata.dk>
Thu, 21 Mar 2002 21:30:44 +0000 (21:30 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Thu, 21 Mar 2002 21:30:44 +0000 (21:30 +0000)
configure.in
doc/yaz.xml.in
doc/yazhtml.dsl [deleted file]
doc/yazhtml.dsl.in [new file with mode: 0644]
doc/yazphp.dsl [deleted file]
doc/yazphp.dsl.in [new file with mode: 0644]
doc/yazprint.dsl [deleted file]
doc/yazprint.dsl.in [new file with mode: 0644]

index 60411a1..00c5c40 100644 (file)
@@ -1,6 +1,6 @@
 dnl YAZ Toolkit, Index Data 1994-2001
 dnl See the file LICENSE for details.
-dnl $Id: configure.in,v 1.64 2002-03-18 12:22:00 adam Exp $
+dnl $Id: configure.in,v 1.65 2002-03-21 21:30:44 adam Exp $
 AC_INIT(include/yaz/yaz-version.h)
 AM_INIT_AUTOMAKE(yaz, 1.8.6)
 dnl
@@ -11,6 +11,51 @@ AC_PROG_CPP
 AC_PROG_INSTALL
 AM_DISABLE_SHARED
 AM_PROG_LIBTOOL
+dnl
+dnl ----- DOCBOOK DTD
+AC_SUBST(DTD_DIR)
+AC_ARG_WITH(dtd, [  --with-dtd[=DIR]        Use docbookx.dtd in DIR],
+[
+   if test -f "$withval/docbookx.dtd"; then
+      DTD_DIR=$withval
+   fi
+],[
+   AC_MSG_CHECKING(for docbookx.dtd)
+   for d in /usr/share/sgml/docbook/dtd/xml/4.1.2 \
+            /usr/share/sgml/docbook/dtd/xml/4.0 \
+           /usr/lib/sgml/dtd/docbook-xml 
+   do
+     if test -f $d/docbookx.dtd; then
+       AC_MSG_RESULT($d)
+       DTD_DIR=$d
+       break
+     fi
+   done
+   if test -z "$DTD_DIR"; then
+      AC_MSG_RESULT(Not found)
+   fi
+])
+AC_SUBST(DSSSL_DIR)
+AC_ARG_WITH(dsssl,[  --with-dsssl[=DIR]      Use DSSSL in DIR/{html,print}/docbook.dsl],
+[
+   if test -f "$withval/html/docbook.dsl"; then
+      DSSSL_DIR=$withval
+   fi
+],[
+   AC_MSG_CHECKING(for docbook.dsl)
+   for d in /usr/share/sgml/docbook/stylesheet/dsssl/modular \
+            /usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh 
+   do
+     if test -f $d/html/docbook.dsl; then
+       AC_MSG_RESULT($d)
+       DSSSL_DIR=$d
+       break
+     fi
+   done
+   if test -z "$DSSSL_DIR"; then
+      AC_MSG_RESULT(Not found)
+   fi
+])
 dnl 
 dnl ----- yaz-comp: The Yaz Compiler
 AC_SUBST(EXTRAMODULE)
@@ -237,6 +282,9 @@ client/Makefile
 ztest/Makefile
 doc/Makefile
 doc/yaz.xml
+doc/yazhtml.dsl
+doc/yazphp.dsl
+doc/yazprint.dsl
 yaz-config
 lib/yaz-config
 ],[chmod +x yaz-config lib/yaz-config])
index 0ff722a..500631a 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" standalone="no"?>
 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
-                    "/usr/share/sgml/docbook/dtd/xml/4.1.2/docbookx.dtd" [
+                    "@DTD_DIR@/docbookx.dtd" [
 
      <!ENTITY oslash "&#x00F8;"> <!-- CIRCLED DIVISION SLASH -->
      <!ENTITY yaz "YAZ">
@@ -22,7 +22,7 @@
      <!ENTITY comstack "<acronym>COMSTACK</acronym>">
      <!ENTITY zoom "<acronym>ZOOM</acronym>">
 ]>
-<!-- $Id: yaz.xml.in,v 1.1 2002-03-16 11:29:39 adam Exp $ -->
+<!-- $Id: yaz.xml.in,v 1.2 2002-03-21 21:30:44 adam Exp $ -->
 <book id="yaz">
  <bookinfo>
   <title>YAZ User's Guide and Reference</title>
diff --git a/doc/yazhtml.dsl b/doc/yazhtml.dsl
deleted file mode 100644 (file)
index 3342606..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
-<!ENTITY docbook.dsl SYSTEM "/usr/share/sgml/docbook/stylesheet/dsssl/modular/html/docbook.dsl"
-  CDATA DSSSL>
-]>
-<!--
-  $Id: yazhtml.dsl,v 1.6 2001-10-24 09:27:59 adam Exp $
--->
-<style-sheet>
-<style-specification use="docbook">
-<style-specification-body>
-
-(define %use-id-as-filename% #t)
-(define %output-dir% "html")
-(define %html-ext% ".html")
-(define %shade-verbatim% #t)
-
-</style-specification-body>
-</style-specification>
-<external-specification id="docbook" document="docbook.dsl">
-</style-sheet>
-  
-<!--
-Local Variables:
-mode: scheme
-End:
--->
diff --git a/doc/yazhtml.dsl.in b/doc/yazhtml.dsl.in
new file mode 100644 (file)
index 0000000..f72e84c
--- /dev/null
@@ -0,0 +1,26 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY docbook.dsl SYSTEM "@DSSSL_DIR@/html/docbook.dsl"
+  CDATA DSSSL>
+]>
+<!--
+  $Id: yazhtml.dsl.in,v 1.1 2002-03-21 21:30:45 adam Exp $
+-->
+<style-sheet>
+<style-specification use="docbook">
+<style-specification-body>
+
+(define %use-id-as-filename% #t)
+(define %output-dir% "html")
+(define %html-ext% ".html")
+(define %shade-verbatim% #t)
+
+</style-specification-body>
+</style-specification>
+<external-specification id="docbook" document="docbook.dsl">
+</style-sheet>
+  
+<!--
+Local Variables:
+mode: scheme
+End:
+-->
diff --git a/doc/yazphp.dsl b/doc/yazphp.dsl
deleted file mode 100644 (file)
index e621b42..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
-<!ENTITY docbook.dsl SYSTEM "/usr/share/sgml/docbook/stylesheet/dsssl/modular/html/docbook.dsl"
-  CDATA DSSSL>
-]>
-<!--
-  $Id: yazphp.dsl,v 1.5 2001-10-24 09:27:59 adam Exp $
--->
-<style-sheet>
-<style-specification use="docbook">
-<style-specification-body>
-
-(define %use-id-as-filename% #t)
-(define %output-dir% "php")
-(define %html-ext% ".php")
-(define %shade-verbatim% #t)
-
-(define newline "\U-000D")
-
-(define (html-document title-sosofo body-sosofo)
-  (let* (;; Let's look these up once, so that we can avoid calculating
-         ;; them over and over again.
-         (prev         (prev-chunk-element))
-         (next         (next-chunk-element))
-         (prevm        (prev-major-component-chunk-element))
-         (nextm        (next-major-component-chunk-element))
-         (navlist      (list prev next prevm nextm))
-        
-         ;; Let's make it possible to control the output even in the
-         ;; nochunks case. Note: in the nochunks case, (chunk?) will
-         ;; return #t for only the root element.
-         (make-entity? (and (or (not nochunks) rootchunk)
-                            (chunk?)))
-        
-         (make-head?   (or make-entity?
-                           (and nochunks
-                                (node-list=? (current-node)
-                                             (sgml-root-element)))))
-         (doc-sosofo 
-          (if make-head?
-             (make sequence
-               (make formatting-instruction data:
-                     (string-append "<" "?php "
-                                    newline
-                                    "require \"../../id_common.inc\";"
-                                    newline
-                                    "id_header(\""
-                                    )
-                     )
-               title-sosofo
-               (make formatting-instruction data:
-                     (string-append "\");"
-                                    newline
-                                    "?" ">"
-                                    )
-                     )
-               (header-navigation (current-node) navlist)
-               body-sosofo
-               (footer-navigation (current-node) navlist)
-               (make formatting-instruction data:
-                     (string-append "<" "?php id_footer() ?>")
-                     )
-               )
-             body-sosofo
-             )
-         )
-        )
-    (if make-entity?
-       (make entity
-         system-id: (html-entity-file (html-file))
-         (if %html-pubid%
-             (make document-type
-               name: "HTML"
-               public-id: %html-pubid%)
-             (empty-sosofo))
-         doc-sosofo)
-       (if (node-list=? (current-node) (sgml-root-element))
-           (make sequence
-             (if %html-pubid%
-                 (make document-type
-                   name: "HTML"
-                   public-id: %html-pubid%)
-                 (empty-sosofo))
-             doc-sosofo)
-           doc-sosofo)
-       )
-    )
-  )
-
-</style-specification-body>
-</style-specification>
-<external-specification id="docbook" document="docbook.dsl">
-</style-sheet>
-
-<!--
-Local Variables:
-mode: scheme
-End:
--->
diff --git a/doc/yazphp.dsl.in b/doc/yazphp.dsl.in
new file mode 100644 (file)
index 0000000..6992650
--- /dev/null
@@ -0,0 +1,98 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY docbook.dsl SYSTEM "@DSSSL_DIR@/html/docbook.dsl"
+  CDATA DSSSL>
+]>
+<!--
+  $Id: yazphp.dsl.in,v 1.1 2002-03-21 21:30:45 adam Exp $
+-->
+<style-sheet>
+<style-specification use="docbook">
+<style-specification-body>
+
+(define %use-id-as-filename% #t)
+(define %output-dir% "php")
+(define %html-ext% ".php")
+(define %shade-verbatim% #t)
+
+(define newline "\U-000D")
+
+(define (html-document title-sosofo body-sosofo)
+  (let* (;; Let's look these up once, so that we can avoid calculating
+         ;; them over and over again.
+         (prev         (prev-chunk-element))
+         (next         (next-chunk-element))
+         (prevm        (prev-major-component-chunk-element))
+         (nextm        (next-major-component-chunk-element))
+         (navlist      (list prev next prevm nextm))
+        
+         ;; Let's make it possible to control the output even in the
+         ;; nochunks case. Note: in the nochunks case, (chunk?) will
+         ;; return #t for only the root element.
+         (make-entity? (and (or (not nochunks) rootchunk)
+                            (chunk?)))
+        
+         (make-head?   (or make-entity?
+                           (and nochunks
+                                (node-list=? (current-node)
+                                             (sgml-root-element)))))
+         (doc-sosofo 
+          (if make-head?
+             (make sequence
+               (make formatting-instruction data:
+                     (string-append "<" "?php "
+                                    newline
+                                    "require \"../../id_common.inc\";"
+                                    newline
+                                    "id_header(\""
+                                    )
+                     )
+               title-sosofo
+               (make formatting-instruction data:
+                     (string-append "\");"
+                                    newline
+                                    "?" ">"
+                                    )
+                     )
+               (header-navigation (current-node) navlist)
+               body-sosofo
+               (footer-navigation (current-node) navlist)
+               (make formatting-instruction data:
+                     (string-append "<" "?php id_footer() ?>")
+                     )
+               )
+             body-sosofo
+             )
+         )
+        )
+    (if make-entity?
+       (make entity
+         system-id: (html-entity-file (html-file))
+         (if %html-pubid%
+             (make document-type
+               name: "HTML"
+               public-id: %html-pubid%)
+             (empty-sosofo))
+         doc-sosofo)
+       (if (node-list=? (current-node) (sgml-root-element))
+           (make sequence
+             (if %html-pubid%
+                 (make document-type
+                   name: "HTML"
+                   public-id: %html-pubid%)
+                 (empty-sosofo))
+             doc-sosofo)
+           doc-sosofo)
+       )
+    )
+  )
+
+</style-specification-body>
+</style-specification>
+<external-specification id="docbook" document="docbook.dsl">
+</style-sheet>
+
+<!--
+Local Variables:
+mode: scheme
+End:
+-->
diff --git a/doc/yazprint.dsl b/doc/yazprint.dsl
deleted file mode 100644 (file)
index 3b65687..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
-<!ENTITY docbook.dsl SYSTEM "/usr/share/sgml/docbook/stylesheet/dsssl/modular/print/docbook.dsl"
-  CDATA DSSSL>
-]>
-<!--
-  $Id: yazprint.dsl,v 1.5 2001-10-22 13:57:24 adam Exp $
--->
-<style-sheet>
-<style-specification use="docbook">
-<style-specification-body>
-
-</style-specification-body>
-</style-specification>
-<external-specification id="docbook" document="docbook.dsl">
-</style-sheet>
-
-<!--
-Local Variables:
-mode: scheme
-End:
--->
diff --git a/doc/yazprint.dsl.in b/doc/yazprint.dsl.in
new file mode 100644 (file)
index 0000000..79b641c
--- /dev/null
@@ -0,0 +1,21 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY docbook.dsl SYSTEM "@DSSSL_DIR@/print/docbook.dsl"
+  CDATA DSSSL>
+]>
+<!--
+  $Id: yazprint.dsl.in,v 1.1 2002-03-21 21:30:45 adam Exp $
+-->
+<style-sheet>
+<style-specification use="docbook">
+<style-specification-body>
+
+</style-specification-body>
+</style-specification>
+<external-specification id="docbook" document="docbook.dsl">
+</style-sheet>
+
+<!--
+Local Variables:
+mode: scheme
+End:
+-->