Menu

#3 xi:include is tagged as error on validate

2015.05.0
pending
Question (1)
2015-05-02
2014-02-04
No

Installed the Eclipse plugin and opened a first project.
The docbook file has 2 places with <xi:include> and those 2 lines result in errors when the docbook file is validated by using the validate menu.</xi:include>

Description Resource Path Location Type
cvc-complex-type.2.4.a: Invalid content was found starting with element 'xi:include'. One of '{"http://docbook.org/ns/docbook":title, "http://docbook.org/ns/docbook":titleabbrev, "http://docbook.org/ns/docbook":info, "http://docbook.org/ns/docbook":alt, "http://docbook.org/ns/docbook":mediaobject, "http://docbook.org/ns/docbook":mathphrase}' is expected. docbook.xml /DocBook5test/source/en line 19 XML Problem

How can <xi:include> can be used without causing error messages? </xi:include>

Discussion

  • Nils Cordes

    Nils Cordes - 2014-02-04
    • status: open --> accepted
    • assigned_to: Nils Cordes
     
  • Nils Cordes

    Nils Cordes - 2014-02-04

    It is a known problem that the DocBook XML Editor validates DocBook documents with XInclude elements as in valid. But the Ant build resolves the XInclude elements and validates the resulting XML document using the org.apache.xerces.parsers.XIncludeParserConfiguration as suggest by http://www.docbook.org/docs/howto/#faq-authoring-validating-xincludes.

    To validate DocBook documents with XInclude elements it is required to use the DocBook Relax NG schema which allows xi:include elements (docbookxi.rng, http://www.docbook.org/xml/5.0/rng/). Currently the Eclipse webtools.sourceediting (wich is the base of the DocBook XML Editor) doesn't support Relax NG schemas (org.eclipse.wst.xml.relaxng is still in incubation state).

    We will try to integrate the Relax NG schemas in one off next releases.

     
  • David Jackson

    David Jackson - 2014-07-29

    I have the same problem but only the first xi:include in the file is flagged in error - all the following includes are not flagged. See screen shot.
    This is confusing to users who go looking for the "error" when one doesn't actually exist.

     
  • Nils Cordes

    Nils Cordes - 2014-07-29
    • status: accepted --> pending
     
  • Nils Cordes

    Nils Cordes - 2014-07-29
    • Milestone: 2014.07.0 --> 2014.08.0
     
  • Nils Cordes

    Nils Cordes - 2015-05-02

    The DocBook V5.0 schema distribution does not contain the file "xi.xsd". To fix it the missing file was added and the xml catalog contribution was reworked.
    This fix will become part of the next release.

     

Log in to post a comment.