Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   XML (http://www.velocityreviews.com/forums/f32-xml.html)
-   -   validation alternatives (http://www.velocityreviews.com/forums/t167689-validation-alternatives.html)

indo3 08-19-2004 08:47 AM

validation alternatives
 
If an e.g. XHTML document has a <!DOCTYPE html system ..dtd> AND a
schemaLocation="..xsd" attribute
in the root, to be valid, need both to be checked? that means need the document
first to be checked against the DTD and then against the Schema?
or can one freely choose among both or how is the situation here?

THANKS

Richard Tobin 08-19-2004 09:54 AM

Re: validation alternatives
 
In article <ca2913ec.0408190047.5403ab07@posting.google.com >,
indo3 <indo34@gmx.de> wrote:

>If an e.g. XHTML document has a <!DOCTYPE html system ..dtd> AND a
>schemaLocation="..xsd" attribute
>in the root, to be valid, need both to be checked?


There's no universal meaning of "valid" - you have to first decide
whether you are talking about DTDs, Schemas, or any other validation
mechanism.

Both DTD and schema validation are optional. If you do both, you
should do DTD validation first, because it is not defined as a
standalone operation, but rather as part of XML parsing.

-- Richard

Keith M. Corbett 08-19-2004 09:40 PM

Re: validation alternatives
 
"Richard Tobin" <richard@cogsci.ed.ac.uk> wrote in message
news:cg1tcl$316g$2@pc-news.cogsci.ed.ac.uk...
> There's no universal meaning of "valid" - you have to first decide
> whether you are talking about DTDs, Schemas, or any other validation
> mechanism.


Dunno about "universal meaning" but the W3C XML specification[1] clearly
defines validation in terms of DTDs.

/kmc

[1] http://www.w3.org/TR/2004/REC-xml-20040204/#proc-types



Richard Tobin 08-19-2004 10:38 PM

Re: validation alternatives
 
In article <TK-dnUo0CZKwg7jcRVn-gA@comcast.com>,
Keith M. Corbett <kmc@world.std.com> wrote:

>Dunno about "universal meaning" but the W3C XML specification[1] clearly
>defines validation in terms of DTDs.


And the Schema spec defines it in terms of Schemas. No one spec can
claim exclusive ownership of the word "valid", so unless the context
is clear it makes sense to refer to DTD-validity, Schema-validity, and
so on.

-- Richard

Stefan Ram 08-19-2004 11:11 PM

Re: validation alternatives
 
richard@cogsci.ed.ac.uk (Richard Tobin) writes:
>>Dunno about "universal meaning" but the W3C XML specification[1] clearly
>>defines validation in terms of DTDs.

>And the Schema spec defines it in terms of Schemas.


DTDs are part of the XML specification, Schemas are not.

The meaning of "valid" is given by the XML-specification.

http://www.w3.org/TR/2000/REC-xml-20....html#dt-valid

While the XML-schema-specification

http://www.w3.org/TR/xmlschema-1/

says

"Throughout this specification, [Definition:] the word
valid and its derivatives are used to refer to clause 1
above, the determination of local schema-validity."

Richard Tobin 08-20-2004 10:25 AM

Re: validation alternatives
 
In article <validity-20040820010920@ram.dialup.fu-berlin.de>,
Stefan Ram <ram@zedat.fu-berlin.de> wrote:

> DTDs are part of the XML specification, Schemas are not.


This is getting silly.

If someone says "is this document valid", how do you know that they
are asking in terms of the XML spec rather than the Schema spec?
Instead of arguing pedantically about what they ought to mean by
"valid", why not just say "it's DTD-valid" or "it's Schema-valid"?

To re-iterate the real point: DTD-validity and Schema-validity are
independent (a document can be valid according to one but not the
other); it's quite reasonable to check either or both; and if you do
both then DTD-validation is done as part of parsing and
Schema-validation afterwards.

-- Richard


All times are GMT. The time now is 01:22 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.