OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] xsltproc, XInclude, and use of XML catalog


On Thu, Sep 04, 2003 at 06:46:01PM -0400, Taro Ikai wrote:
> Given a modularized docset where a main document XIncludes files in 
> subdirectories:
> 
> myset.xml:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE book PUBLIC  "-//mycompany//DTD DocBook XML V4.2-Based Extension 
> V1.0//EN" "mycustomized-docbook.dtd" [
> <!ENTITY % local.common.attrib "xml:base  CDATA  #IMPLIED">
> <!ENTITY % xinclude SYSTEM "my/xinclude.mod">
> %xinclude;
> ]>
> <set>
>   <title>my doc set</title>
>   <xi:include href="book_a/book_a.xml"/>
> </set>
> 
> book_a/book_a.xml:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE book PUBLIC  "-//mycompany//DTD DocBook XML V4.2-Based Extension 
> V1.0//EN" "mycustomized-docbook.dtd" [
> <!ENTITY % local.common.attrib "xml:base  CDATA  #IMPLIED">
> <!ENTITY % xinclude SYSTEM "my/xinclude.mod">
> %xinclude;
> ]>
> <book>
>   <title>my doc set</title>
>   <xi:include href="chapter_1.xml"/>
>   <xi:include href="chapter_2.xml"/>
> </book>
> 
> How should I set up the XML catalog?
> 
> When I run xsltproc on the main document, and it comes to process the 
> book_a.xml file, 
> it tries to resolve "book_a/mycustomized-docbook.dtd" instead of 
> "mycustomized-docbook.dtd"
> and fails to load the DTD.

I recommend you resolve it from your PUBLIC identifier,
something like this:

<group  prefer="public"  xml:base="file:///usr/share/xml/" >  
  <public 
     publicId="-//mycompany//DTD DocBook XML V4.2-Based Extension V1.0//EN"
     uri="docbook42/docbookx.dtd"/>
</group>

The prefer="public" in the group elements
says to try the PUBLIC identifier first.
The xml:base attribute in the group provides the first
part of the path, and the uri adds the rest.

-- 

Bob Stayton                                 400 Encinal Street
Publications Architect                      Santa Cruz, CA  95060
Technical Publications                      voice: (831) 427-7796
The SCO Group                               fax:   (831) 429-1887
                                            email: bobs@sco.com


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]