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

Re: nxml-mode, docbook, xinclude

Expand Messages
  • wyuenho
    ... 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
    Message 1 of 24 , Aug 7, 2009
    • 0 Attachment
      --- 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?

      >
      > 2009/8/7 Lennart Borgman <lennart.borgman@...>:
      >
      > >> You should be using the docbook v5 schema.
      > >> nxml-mode has that as valid.
      > >
      > > But that is only included in Emacs 23, not the standalone nxml-mode
      > > that Emacs 22 users download.
      >
      >
      > The question was about docbook?
      > I don't think even your nxml-mode includes that (nor should it?)
      >
      > docbook is available from sourceforge. With the schema
      > for v5, from which the rnc can be added to nxml-mode
      > with no problem.
      >
      >
      > HTH
      >
      >
      > --
      > Dave Pawson
      > XSLT XSL-FO FAQ.
      > Docbook FAQ.
      > http://www.dpawson.co.uk
      >
    • 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 2 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 3 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 4 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 5 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.