Skip to content

Validation fails when xi:include elements are mixed with directly incldued ones #655

Open
@Oobiewan

Description

@Oobiewan

I have docbook xml content that uses xi:include elements. Validation finds the following correct (which is the expected behavior):

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.docbook.org/xml/4.4/docbookx.dtd" [
    <!ENTITY % xinclude SYSTEM "http://www.docbook.org/xml/4.4/xinclude.mod">
    %xinclude;
]>

<chapter id="chapterCloud">
    <title>Enabling stuff</title>
        <para>This chapter describes the deployment process. </para>
    <xi:include href="deploy_database.xml"
        xmlns:xi="http://www.w3.org/2001/XInclude" />
    <xi:include href="add_new_customer.xml"
        xmlns:xi="http://www.w3.org/2001/XInclude" />
</chapter>

However, the plugin considers the following invalid :

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.docbook.org/xml/4.4/docbookx.dtd" [
    <!ENTITY % xinclude SYSTEM "http://www.docbook.org/xml/4.4/xinclude.mod">
    %xinclude;
]>
<chapter id="chapterCloud">
    <title>Enabling stuff</title>
        <para>This chapter describes the deployment process. </para>
    <xi:include href="deploy_database.xml"
        xmlns:xi="http://www.w3.org/2001/XInclude" />
    <section><title>title</title>
        <para>dsd</para>
    </section>   
    <xi:include href="add_new_customer.xml"
        xmlns:xi="http://www.w3.org/2001/XInclude" />
</chapter>

This content should also be considered valid, as the files referenced by the xi:include elements are also <section> elements.
P.s.: I realized that this is probably simply because xi:include functionality is not actually supported, so the second example is considered invalid because there is something between </section> and </chapter>. So maybe this is the same issue/feature request as in
#175.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions