This is the mail archive of the docbook@lists.oasis-open.org mailing list for the DocBook project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [docbook] inserting general entities


here is an example document:

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd";>
<book lang="de">
   <bookinfo>
 <xi:include href="../author.xml"
xmlns:xi="http://www.w3.org/2001/XInclude";></xi:include>
  <title>User Guide</title>
  </bookinfo>
  <xi:include href="example.xml"
xmlns:xi="http://www.w3.org/2001/XInclude";></xi:include>
  <xi:include href="debian.xml"
xmlns:xi="http://www.w3.org/2001/XInclude";></xi:include>
</book>

every included File needs also a DTD

example.xml:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd";>
<chapter id="example" lang="de">
<title>Beispiel</title>
    <para><ulink type="text/html" url="example/">Beispiel</ulink></para>
</chapter>

i use it with xsltproc on debian:
xsltproc --xinclude --stringparam base.dir html/ stylesheet.xsl
docbookfile.xml
i don't know how to use xincludes with saxon

Roger

René Haché wrote:

>Roger,
>
>When you write this:
>use the following tag is your main document:
><xi:include href="bibliography.xml"
>xmlns:xi="http://www.w3.org/2003/XInclude";></xi:include>
>
>I am assuming you meant "in your main document" as opposed to "is". When I
>do put it this way in my main document it doesn't validate. Do you have to
>do something else to the DTD or does it not matter to the Saxon processor?
>
>Just for fun, here is a little DocBook document I tested with (which didn't
>validate):
>
><?xml version="1.0" encoding="UTF-8"?>
>
><!DOCTYPE set SYSTEM "C:\studies\tools\dtd\docbookx.dtd">
>
><?xml-stylesheet type="text/xsl"
>	href="C:\studies\tools\xsl\xhtml\docbook.xsl"?>
>
><set>
>	<title>Test Document Studies</title>
>   	<xi:include href="book3.xml"
>		xmlns:xi="http://www.w3.org/2003/XInclude";>
>	</xi:include>
></set>
>
>Obviously, I am using Saxon on Windows machine
>
>Thanks,
>René
>__________________________________________________________________
>
>
>
>To unsubscribe from this list, send a post to docbook-unsubscribe@lists.oasis-open.org, or visit http://www.oasis-open.org/mlmanage/.
>
>  
>


To unsubscribe from this list, send a post to docbook-unsubscribe@lists.oasis-open.org, or visit http://www.oasis-open.org/mlmanage/.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]