Uploaded image for project: 'Forrest'
  1. Forrest
  2. FOR-1173

add demonstration of using xml source documents without declaring a DTD

    Details

      Description

      Add a demonstration of DTD-less source xdoc documents.

        Activity

        Hide
        crossley David Crossley added a comment -
        SourceTypeAction (content aware pipeline) [1] can detect the "Public Identifier" from the Document Type Declaration, which is how most of Forrest operates.

        SourceTypeAction can also use "namespace" or "processing instruction".

        I chose the "processing instruction" method. This enables an elegant solution for tools to know the content type, and does not say anything about a particular schema language that could be used to process it.

        The instance document declares its schema, e.g.
        <?schema apache.org/forrest/schema/xdoc/document/2.0?>
        <document>
          <header>
            ...

        Validation is done as a separate concern [2].

        [1] SourceTypeAction (content aware pipelines)
        http://forrest.apache.org/docs/cap.html

        [2] Using Cocoon Validation Transformers
        http://forrest.apache.org/howto-dev.html#debug-validation
        Show
        crossley David Crossley added a comment - SourceTypeAction (content aware pipeline) [1] can detect the "Public Identifier" from the Document Type Declaration, which is how most of Forrest operates. SourceTypeAction can also use "namespace" or "processing instruction". I chose the "processing instruction" method. This enables an elegant solution for tools to know the content type, and does not say anything about a particular schema language that could be used to process it. The instance document declares its schema, e.g. <?schema apache.org/forrest/schema/xdoc/document/2.0?> <document>   <header>     ... Validation is done as a separate concern [2]. [1] SourceTypeAction (content aware pipelines) http://forrest.apache.org/docs/cap.html [2] Using Cocoon Validation Transformers http://forrest.apache.org/howto-dev.html#debug-validation
        Hide
        crossley David Crossley added a comment -
        See also one discussion of this issue:
         Re: association of RELAX NG with a document
         http://www.relaxng.org/pipermail/relaxng-user/2003-October/000084.html
        Show
        crossley David Crossley added a comment - See also one discussion of this issue:  Re: association of RELAX NG with a document   http://www.relaxng.org/pipermail/relaxng-user/2003-October/000084.html
        Hide
        crossley David Crossley added a comment -
        Added in r780675

        See the example in a 'forrest seed-sample' site:
        http://forrest.zones.apache.org/ft/build/forrest-seed/samples-b/no-dtd.html
        Show
        crossley David Crossley added a comment - Added in r780675 See the example in a 'forrest seed-sample' site: http://forrest.zones.apache.org/ft/build/forrest-seed/samples-b/no-dtd.html
        Hide
        crossley David Crossley added a comment -
        I did also try using the "namespace" method of SourceTypeAction. It does detect that properly, but then something further down the forrest processing gets confused about the namespace.
        Show
        crossley David Crossley added a comment - I did also try using the "namespace" method of SourceTypeAction. It does detect that properly, but then something further down the forrest processing gets confused about the namespace.

          People

          • Assignee:
            Unassigned
            Reporter:
            crossley David Crossley
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development