Loading ...
Sorry, an error occurred while loading the content.
 

Validated Xinclude'd file

Expand Messages
  • xylobus2003
    Hello, If you have an included file, e.g. Docbook5 chapter included in Docbook5 book, which has no DTD, and not a valid root element on its own, is there a way
    Message 1 of 2 , Mar 28, 2010
      Hello,

      If you have an included file, e.g. Docbook5 chapter included in Docbook5 book, which has no DTD, and not a valid root element on its own, is there a way to have it validated?

      In other words, is there a way to get nXML mode to validate a standalone chapter document?

      book.xml (nXML valid - using docbookxi.rnc):
      <?xml version="1.0" encoding="utf-8"?>
      <book xmlns="http://docbook.org/ns/docbook"
      xmlns:xi="http://www.w3.org/2001/XInclude">
      <title>My First Book</title>
      <xi:include href="chap1.xml"/>
      </book>

      chap1.xml (nXML Invalid - using docbookxi.rnc):

      <?xml version="1.0" encoding="utf-8"?>

      <chapter id="ch1"><title>My First Chapter</title>
      <para>My first paragraph.</para>
    • Dave Pawson
      ... docbook provides docbookxi.rnc which can be used with any file using xInclude. to validate the chapter, simply set the schema to the docbook rnc file. It
      Message 2 of 2 , Mar 29, 2010
        On 29 March 2010 05:48, xylobus2003 <xylobus2003@...> wrote:
        > Hello,
        >
        > If you have an included file, e.g. Docbook5 chapter included in Docbook5 book, which has no DTD, and not a valid root element on its own, is there a way to have it validated?
        >
        > In other words, is there a way to get nXML mode to validate a standalone chapter document?


        docbook provides docbookxi.rnc which can be used with any file using xInclude.

        to validate the chapter, simply set the schema to the docbook rnc file.
        It has chapter as a start element

        HTH


        --
        Dave Pawson
        XSLT XSL-FO FAQ.
        Docbook FAQ.
        http://www.dpawson.co.uk
      Your message has been successfully submitted and would be delivered to recipients shortly.