validation alternatives

Discussion in 'XML' started by indo3, Aug 19, 2004.

  1. indo3

    indo3 Guest

    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
    indo3, Aug 19, 2004
    #1
    1. Advertising

  2. In article <>,
    indo3 <> 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
    Richard Tobin, Aug 19, 2004
    #2
    1. Advertising

  3. "Richard Tobin" <> wrote in message
    news:cg1tcl$316g$...
    > 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
    Keith M. Corbett, Aug 19, 2004
    #3
  4. In article <>,
    Keith M. Corbett <> 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
    Richard Tobin, Aug 19, 2004
    #4
  5. indo3

    Stefan Ram Guest

    (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-20001006.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."
    Stefan Ram, Aug 20, 2004
    #5
  6. In article <-berlin.de>,
    Stefan Ram <-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
    Richard Tobin, Aug 20, 2004
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Robert V. Hanson
    Replies:
    2
    Views:
    659
    Yan-Hong Huang[MSFT]
    Jul 3, 2003
  2. Don Pedro
    Replies:
    0
    Views:
    450
    Don Pedro
    Jul 3, 2003
  3. Mark Kamoski

    Re: alternatives to SmartNavigation

    Mark Kamoski, Aug 28, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    423
    Mark Kamoski
    Aug 28, 2003
  4. Charles Rumbold

    Alternatives to Windows Service?

    Charles Rumbold, Oct 28, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    884
    Rajesh.V
    Oct 28, 2003
  5. Guest

    Alternatives to IIS

    Guest, Dec 18, 2003, in forum: ASP .Net
    Replies:
    8
    Views:
    791
    Jerry Boone
    Dec 18, 2003
Loading...

Share This Page