Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > validation alternatives

Reply
Thread Tools

validation alternatives

 
 
indo3
Guest
Posts: n/a
 
      08-19-2004
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
 
Reply With Quote
 
 
 
 
Richard Tobin
Guest
Posts: n/a
 
      08-19-2004
In article <(E-Mail Removed) >,
indo3 <(E-Mail Removed)> 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
 
Reply With Quote
 
 
 
 
Keith M. Corbett
Guest
Posts: n/a
 
      08-19-2004
"Richard Tobin" <(E-Mail Removed)> wrote in message
news:cg1tcl$316g$(E-Mail Removed)...
> 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


 
Reply With Quote
 
Richard Tobin
Guest
Posts: n/a
 
      08-19-2004
In article <(E-Mail Removed)>,
Keith M. Corbett <(E-Mail Removed)> 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
 
Reply With Quote
 
Stefan Ram
Guest
Posts: n/a
 
      08-19-2004
http://www.velocityreviews.com/forums/(E-Mail Removed) (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."
 
Reply With Quote
 
Richard Tobin
Guest
Posts: n/a
 
      08-20-2004
In article <(E-Mail Removed)-berlin.de>,
Stefan Ram <(E-Mail Removed)-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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Displaying a Validation Error in a Validation Summary Control Lucas Tam ASP .Net 2 02-26-2004 07:49 PM
ASP.NET Web Forms Validation Controls are Server-Side or Client-Side Validation? Matt ASP .Net 14 01-30-2004 09:15 AM
Web form validation vs object validation Colin Basterfield ASP .Net 1 11-29-2003 12:10 AM
validation summary doesnt display when there's client-side validation Libs ASP .Net 0 06-25-2003 03:05 PM
Re: only custom validation control does server side validation? Colin Mackay ASP .Net 0 06-25-2003 07:54 AM



Advertisments