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

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

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


Subject: Re: [docbook] XInclude problem


Bob,

There are two errors while validating the master document. 
The first error is as follows:
Unexpected element "xi:include". The content of the parent element
type must match
"(sectioninfo?,(title,subtitle?,titleabbrev?),(toc|lot|index|glossary|bibliography)*,
(((calloutlist|glosslist|itemizedlist|orderedlist|segmentedlist|simplelist|variablelist|caution|important|note|tip|warning|literallayout|programlisting|programlistingco|screen|screenco|screenshot|synopsis|cmdsynopsis|funcsynopsis|classsynopsis|fieldsynopsis|constructorsynopsis|destructorsynopsis|methodsynopsis|formalpara|para|simpara|address|blockquote|graphic|graphicco|mediaobject|mediaobjectco|informalequation|informalexample|informalfigure|informaltable|equation|example|figure|table|msgset|procedure|sidebar|qandaset|task|anchor|bridgehead|remark|highlights|abstract|authorblurb|epigraph|indexterm|beginpage|xi:include)+,
(refentry*|section*|simplesect*))|refentry+|section+|simplesect+),(toc|lot|index|glossary|bibliography)*)".
This error refers to the line where the last XInclude is placed
(reference to f3.xml).

The next one:
The content of element type "section" must match
"(sectioninfo?,(title,subtitle?,titleabbrev?),
(toc|lot|index|glossary|bibliography)*,
(((calloutlist|glosslist|itemizedlist|orderedlist|segmentedlist|simplelist|variablelist|caution|important|note|tip|warning|literallayout|programlisting|programlistingco|screen|screenco|screenshot|synopsis|cmdsynopsis|funcsynopsis|classsynopsis|fieldsynopsis|constructorsynopsis|destructorsynopsis|methodsynopsis|formalpara|para|simpara|address|blockquote|graphic|graphicco|mediaobject|mediaobjectco|informalequation|informalexample|informalfigure|informaltable|equation|example|figure|table|msgset|procedure|sidebar|qandaset|task|anchor|bridgehead|remark|highlights|abstract|authorblurb|epigraph|indexterm|beginpage|xi:include)+,
(refentry*|section*|simplesect*))|refentry+|section+|simplesect+),
(toc|lot|index|glossary|bibliography)*)".
This refers to the last line of the master document, the closing section tag.

I use Oxygen 5.1, Xalan or Saxon 6.5.3 (both shipped with Oxygen) as
the XSLT processor, on Windows. What's interesting, the validation
using Xalan fails while the transformation works perfectly (the same
for the Saxon validation).

Master document is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
                         "http://www.docbook.org/xml/4.3/docbookx.dtd"; [
<!ENTITY % xinclude SYSTEM "/d:/Program
Files/Oxygen/frameworks/docbook/dtd/xinclude.mod" >
%xinclude;
<!ENTITY % local.common.attrib "xml:base CDATA #IMPLIED" >
]>
<section>
    <title>Section Title</title>
    <para>Text </para>
    <xi:include href="f1.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
    <xi:include href="f2.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
    <section>
        <title>Subsection Title</title>
        <para>Text Text Text Text Text Text Text Text Text Text Text
Text Text Text Text Text Text Text Text Text.</para>
    </section>
    <xi:include href="f3.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
</section>

f1.xml, f2.xml, and f3.xml are identical:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
                         "http://www.docbook.org/xml/4.3/docbookx.dtd";>
<section>
    <title>Section Title</title>
        <para>Text 33333333333</para>
</section>

For the XML parser the following features are enabled in the Oxygen editor:

http://apache.org/xml/features/validation/schema
http://apache.org/xml/features/validation/schema-full-checking

as well as XInclude processing.

I hope you'll be able to reproduce the problem.

Best regards,
Zbyszek


On 7/6/05, Bob Stayton <bobs@sagehill.net> wrote:
>        
> If all of these XIncludes are readable  files whose root elements are section elements, then this document should  validate.  I just tried it and could not duplicate your problem.  Can  you describe how you are validating, including the versions of the tools you are  using, as well as the error message you are getting? 
>   
> Bob Stayton
> Sagehill Enterprises
> DocBook Consulting
> bobs@sagehill.net
>  
>   
>   
>    
> ----- Original Message -----    
> From:    Zbyszek    Cybulski    
> To: docbook@lists.oasis-open.org       
> Sent: Tuesday, July 05, 2005 12:20    AM   
> Subject: [docbook] XInclude problem   
> 
> Hi all,
> 
> I got a problem with XInclude. I have a    document, root element is <section>:
> 
> <?xml version="1.0"    encoding="UTF-8"?>
> <!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook    XML    V4.3//EN"
>                          "http://www.docbook.org/xml/4.3/docbookx.dtd";>
> <section    id="summary_rep"> <!-- this is the root -->
>      <title>Summary Report</title>
>   <para>bla bla    bla.</para>
> 
>   <xi:include href="F_subscr_info.xml"    xmlns:xi="http://www.w3.org/2001/XInclude";></xi:include>
>      <xi:include href="F_net_info.xml" xmlns:xi="http://www.w3.org/2001/XInclude";></xi:include>
>      <xi:include href="F_net_status.xml" xmlns:xi="http://www.w3.org/2001/XInclude";></xi:include>
>      <xi:include href="F_desktop_status.xml" xmlns:xi="http://www.w3.org/2001/XInclude";></xi:include>
>      
>   <section    id="summary_chrono">
>            ...
>   </section>
> </section>
> 
> and this document    validates and XInclude works perfectly. Note that included documents have also    <section> as the root element.
> 
> But I also have a different    document:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE    section PUBLIC "-//OASIS//DTD DocBook XML    V4.3//EN"
>                          "http://www.docbook.org/xml/4.3/docbookx.dtd";>
> <section    id="summary_rep"> <!-- this is the root -->
>      <title>Summary Report</title>
>   <para>bla bla    bla.</para>
> 
>   <xi:include href="F_subscr_info.xml"    xmlns:xi="http://www.w3.org/2001/XInclude";></xi:include>
>      <xi:include href="F_net_info.xml" xmlns:xi="http://www.w3.org/2001/XInclude";></xi:include>
>      <xi:include href="F_net_status.xml" xmlns:xi="http://www.w3.org/2001/XInclude";></xi:include>
>      <xi:include href="F_desktop_status.xml" xmlns:xi="http://www.w3.org/2001/XInclude";></xi:include>
>      
>   <section    id="summary_chrono">
>            ...
>   </section>
>  <xi:include href="F_mail.xml"    xmlns:xi="http://www.w3.org/2001/XInclude";></xi:include>
> </section>
> 
> I    can't validate this document though the included one is similar to those in    the above example. The error message says the last xinclude element is unknown    and the content of the section must match... and here goes the list of allowed    elements. Those xincludes at the top are resolved but that at the bottom    isn't. What's wrong with this document and why xinludes aren't allowed in the    place I chose.
> 
> Tks,
> 
> Zbyszek
> 
>


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