Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > XML Architecture Question (Best Practices?)

Reply
Thread Tools

XML Architecture Question (Best Practices?)

 
 
shrike@cyberspace.org
Guest
Posts: n/a
 
      12-19-2007
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
 
Reply With Quote
 
 
 
 
keshlam-nospam@comcast.net
Guest
Posts: n/a
 
      12-20-2007
On Dec 19, 11:38 am, "(E-Mail Removed)" <(E-Mail Removed)>
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


 
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
collocated architecture versus distributed architecture apngss@yahoo.com C Programming 3 09-29-2005 07:44 AM
collocated architecture versus distributed architecture apngss@yahoo.com Java 3 09-29-2005 07:44 AM
collocated architecture versus distributed architecture apngss@yahoo.com C++ 4 09-29-2005 07:44 AM
ON Linux Platform: How can we build binaries for another architecture from 0x86 architecture rashmi C Programming 2 07-05-2005 02:31 PM
how can I use a signal defined in one Architecture to another Architecture Muhammad Khan VHDL 4 07-10-2003 06:14 PM



Advertisments