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

Re: [emacs-nxml-mode] Re: nxml-mode, docbook, xinclude

Expand Messages
  • Dave Pawson
    ... It is. It is also an xml namespaced element like any other? Hence it needs to be declared in the schema for the instance you re generating using nxml-mode.
    Message 1 of 24 , Aug 7, 2009
    • 0 Attachment
      2009/8/7 wyuenho <wyuenho@...>:
      > --- In emacs-nxml-mode@yahoogroups.com, Dave Pawson <dave.pawson@...> wrote:
      > It seems that the xinclude grammar is directly merged into the docbook grammar. But xinclude is meant to be general purpose, how do people validate other xinclude documents if there's not a separate xinclude grammar that's easily extensible for other grammars?


      It is. It is also an xml namespaced element like any other?
      Hence it needs to be declared in the schema for the instance you're generating
      using nxml-mode.

      Take the model from docbookxi.rnc


      HTH



      --
      Dave Pawson
      XSLT XSL-FO FAQ.
      Docbook FAQ.
      http://www.dpawson.co.uk
    • Steinar Bang
      ... As expressed in a DOCTYPE declaration of a document? Yes, it can. I ve used that a lot for legacy formats. You can also match on the document element
      Message 2 of 24 , Aug 23, 2009
      • 0 Attachment
        >>>>> Lennart Borgman <lennart.borgman@...>:

        > Thanks. So a doctypePublicId could be used to distinguish different
        > Docbook versions?

        As expressed in a DOCTYPE declaration of a document? Yes, it can.

        I've used that a lot for legacy formats.

        You can also match on the document element (i.e. the outermost element
        in an XML document), in two way:
        - local name, with an optional prefix
        - document element default namespace
        (but, curiously enough, not document element default name space and
        local name)

        And you can match on a processing instruction.

        And you can match on file URI, with wildcards (you can e.g. match on
        extensions).


        > On the OASIS site I see that they do not distinguish rng files for
        > different Docbook versions by file name, but by file path/location. Is
        > that a convenient way in nxml-mode? Can you use for example

        > <typeId id="DocBook4.5" uri="docbook/dokbook4.5.rnc"/>

        Without having actually tried it, I'm guessing yes. I have everything
        in a flat structure (how many schemas do one need? I have maven, and
        ant, and something called CPE, that I can no longer remember what is,
        and a custom version of docbook, all in a single directory, with a
        schemas.xml file), and no time to experiment.
      • Lennart Borgman
        Thanks Steinar, I will look at this more later.
        Message 3 of 24 , Aug 23, 2009
        • 0 Attachment
          Thanks Steinar, I will look at this more later.


          On Sun, Aug 23, 2009 at 8:21 PM, Steinar Bang<sb@...> wrote:
          >
          >
          >>>>>> Lennart Borgman <lennart.borgman@...>:
          >
          >> Thanks. So a doctypePublicId could be used to distinguish different
          >> Docbook versions?
          >
          > As expressed in a DOCTYPE declaration of a document? Yes, it can.
          >
          > I've used that a lot for legacy formats.
          >
          > You can also match on the document element (i.e. the outermost element
          > in an XML document), in two way:
          > - local name, with an optional prefix
          > - document element default namespace
          > (but, curiously enough, not document element default name space and
          > local name)
          >
          > And you can match on a processing instruction.
          >
          > And you can match on file URI, with wildcards (you can e.g. match on
          > extensions).
          >
          >> On the OASIS site I see that they do not distinguish rng files for
          >> different Docbook versions by file name, but by file path/location. Is
          >> that a convenient way in nxml-mode? Can you use for example
          >
          >> <typeId id="DocBook4.5" uri="docbook/dokbook4.5.rnc"/>
          >
          > Without having actually tried it, I'm guessing yes. I have everything
          > in a flat structure (how many schemas do one need? I have maven, and
          > ant, and something called CPE, that I can no longer remember what is,
          > and a custom version of docbook, all in a single directory, with a
          > schemas.xml file), and no time to experiment.
          >
          >
        • Dave Pawson
          ... This might be more appropriate on the docbook-apps mailing list? Certainly for the schema related questions. regards -- Dave Pawson XSLT XSL-FO FAQ.
          Message 4 of 24 , Aug 23, 2009
          • 0 Attachment
            2009/8/23 Lennart Borgman <lennart.borgman@...>:
            > Thanks Steinar, I will look at this more later.

            This might be more appropriate on the docbook-apps mailing list?
            Certainly for the schema related questions.

            regards


            --
            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.