XML Architecture Question (Best Practices?)

Discussion in 'XML' started by shrike@cyberspace.org, Dec 19, 2007.

  1. Guest

    Howdy,

    I have been studying XML and believe the following to summarize the
    relationship between XML and XML Schemas. Please correct/extend these
    assumptions if I am off-base.

    ############

    1. XML is a syntactical standard for a tagging language.

    2. XML Schemas are a tagging standard for insuring compliance of a
    given XML tag-set to a user-defined tag-set.

    3. In general, an API loads a schema for comparison against an XML
    document.

    ############

    So Schema writing is about defining compliance rules. Some documents
    may be best-effort while others will require stricter conformance.
    That pretty much size it up?

    So what is the most standards-compliant Schema language at the
    moment?

    -Thanks in advance!
    -Psy
     
    , Dec 19, 2007
    #1
    1. Advertising

  2. Guest

    On Dec 19, 11:38 am, "" <>
    wrote:
    > 2. XML Schemas are a tagging standard for insuring compliance of a
    > given XML tag-set to a user-defined tag-set.


    Not quite. Validation checks compliance of a given XML instance
    document (data file) to the schema it's being validated against. You
    can think of schemas as defining "higher-order syntax constraints" --
    they say what tagged elements, and what kind of data content, can
    appear where. They have very limited ability to apply _semantic_
    constraints, so your application will almost always still need to
    check the document, but validation provides an initial check and
    annotation pass, and the schema serves as a basic machine-readable
    published specification of what constitutes a document of this type.

    Part of your problem is that the term "xml schemas" is used to refer
    to both the W3C's own XML Schema language -- which is in some sense
    the "most official" solution -- and to other languages which serve the
    same purpose (such as Relax and Schematron). And technically, even the
    old XML Document Type Description (DTD) is a schema language, though
    since it is almost completely incompatable with XML Namespaces it's of
    steadily decreasing usefulness.

    If you're looking for wide support, DTDs are supported everywhere...
    but, as I say, they're on the verge of becoming obsolete. XML Schema
    is supported almost everywhere at this point, and should probably be
    high on your list of things to learn if you're serious about working
    with XML.

    The others... Sigh. XML Schema *is* verbose, and has a design that
    makes a bit more sense to database programmers than to folks who've
    worked with other kinds of data structures. And it has some
    limitations. The other schema languages do some things XML Schema
    can't and/or express some things more clearly (which is why their
    authors created them) -- but they don't have a lot of traction, and
    frankly I think their best value right now is in pushing the W3C to
    improve future versions of XML Schema by demonstrating interesting
    alternatives. If you're working in a closed environment, where your
    documents aren't going to be validated by anyone but your own
    applications, it may be worth investigating these... but they're of
    minimal real-world utility otherwise, and I'll be somewhat surprised
    if that changes. (Not necessarily displeased, just surprised.)

    > 3. In general, an API loads a schema for comparison against an XML
    > document.


    In specific: A validating XML parser loads a schema (or DTD) and uses
    it to confirm that the incoming XML document(s) conform to that
    schema. Whether the schema is preloaded and enforced against incoming
    documents, or whether each document specifies which schema it wants to
    be validated against, depends on the environment you're working in and
    which tools you're using.

    For more detail, see tutorials at sites like http://www.ibm.com/xml


    >
    > ############
    >
    > So Schema writing is about defining compliance rules. Some documents
    > may be best-effort while others will require stricter conformance.
    > That pretty much size it up?
    >
    > So what is the most standards-compliant Schema language at the
    > moment?
    >
    > -Thanks in advance!
    > -Psy
     
    , Dec 20, 2007
    #2
    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. Muhammad Khan
    Replies:
    4
    Views:
    1,247
    Mike Treseler
    Jul 10, 2003
  2. karim
    Replies:
    0
    Views:
    481
    karim
    Jul 13, 2003
  3. Replies:
    3
    Views:
    523
    Malcolm
    Sep 29, 2005
  4. John Dalberg
    Replies:
    3
    Views:
    593
    samuelhon
    Nov 16, 2006
  5. Chicken McNuggets

    Best book on C gotchas and best practices?

    Chicken McNuggets, Jul 31, 2013, in forum: C Programming
    Replies:
    9
    Views:
    278
    Fred J. Tydeman
    Aug 5, 2013
Loading...

Share This Page