[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Does DTD validation work with namespaces?

  • From: Marcus Carr <mrc@a...>
  • To: xml-dev@l...
  • Date: Fri, 11 Aug 2000 09:56:08 +1000

doctype validation

keshlam@u... wrote:

> Namespaces are NAME spaces. That's all. Folks read all sorts of other
> implications into namespaces, and everyone has their own ideas about what
> they want to do with namespaces, but namespaces themselves (a) are just
> naming and (b) make no particular effort to be compatable with DTD
> validation. There was a fairly explicit assumption that if you were using
> Namespaces, you would either work with well-formed documents or with a
> namespace-aware schema language, _NOT_ with DTDs. If you insist on mixing
> the two, and it doesn't work well, the response is going to be "we know."

You're not giving us much credit - most of the participants of this thread are
(I think) well aware of the issues. What we're driving at is the inclusion of a
fragment of a document from a second DTD that may be the same or different than
the first. I would like to be able to do something like:

<!DOCTYPE Foo SYSTEM "Foo.dtd">
<Foo>
  <Bar>This is a Bar suddenly interupted by a
    <!DOCTYPE Boo SYSTEM "Boo.dtd">
    <Boo>This is my Boo element</Boo>
  </Bar>
</Foo>

(Whether the mechanism was a PI or DOCTYPE declaration is irrelevant - I used a
DOCTYPE for clarity.)

After processing the document, I might want the following output:

<Cat:Foo>
  <Cat:Bar>This is a Bar suddenly interupted by a
    <Dog:Boo>This is my Boo element</Dog:Boo>
  </Cat:Bar>
</Cat:Foo>

I understand that it's not practical to try to process the namespaced instance
- I'm more interested in looking further up the chain to the origin. As you
point out, the namespaced document is intended to be the result, probably to be
used as a well-formed document only - I'm happy with that. What I want is a
mechanism that allows me to produce such a document from valid fragments.

> If the tagsets have a clear boundary between them -- in other words, if you
> aren't attempting to permit completely arbitrary interleaving of languages
> -- there's also the solution of using ANY in selected places and having
> your application logic explicitly check those to apply more intelligence at
> those specific points.

That's not much of an option - ANY has never been anything short of plug-ugly.

> Basically, the "publisher's gumbo" model of saying "I want to be able to
> drop MathML takes anywhere inside an SVG graphic embedded anywhere within
> an HTML document -- or vice versa" just doesn't fit the concept of
> Validation in the first place. If you really want the parser to provide
> some validation assistance, you need to give it a specific grammar for the
> document. If you can't describe that grammar precisely, validation can't do
> anything for you.

I can easily describe the grammer, but a validating application isn't allowed
to process it. It's not correct to just lump all of these cases into a term
like "publisher's gumbo" - there are a lot of cases where there are legitimate
and substantial benefits available from being able to build compound documents.
One off the top of my head would be the ability to include a fragment of law in
a case report - we're not trying to build magazine pages.


--
Regards,

Marcus Carr                      email:  mrc@a...
___________________________________________________________________
Allette Systems (Australia)      www:    http://www.allette.com.au
___________________________________________________________________
"Everything should be made as simple as possible, but not simpler."
       - Einstein



PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.