Slashdot Mirror


Authoring Schemas With XSD

Dare Obasanjo points to his own "article on O'Reilly's XML.com that specifies a set of guidlelines for authoring schemas using the W3C XML Schema Definition language commonly abbreviated as XSD. The primary theme is embracing simplicity by showing how to avoid the more complex and esoteric features of the language."

13 of 111 comments (clear)

  1. but where is it used ? by jacquesm · · Score: 3, Interesting

    I am impressed with the amount of press coverage and hype that has been surrounding XML and related technologies for the longest time now, but where is this stuff REALLY used ?

    Does anybody have an example of high volume (so mainstream) websites using XML ? whereever I look all I see is good old HTML, a div or two (mostly tables still though) and Javascript stuff.

    1. Re:but where is it used ? by Coz · · Score: 2, Interesting

      The current Everquest UI also uses XML for customizing the user interface - there are megs of documentation and several nice-looking ones available for download at the various EQ fan sites.

      --
      I love vegetarians - some of my favorite foods are vegetarians.
    2. Re:but where is it used ? by FroMan · · Score: 2, Interesting

      Transformations. That is the part of XML that I like the most. At work I develop a product that has a lot of raw data. Its representations can be vast and numerous. As an example, we can represent the data in an XML format, then using XSLT transform it into HTML, ascii text, CSV, PDF, and even formats that will import into quicken and such.

      Unfortuneatly XML has become a buzzword. So when someone claims they use XML (as people yack about MS with their new file format) it doesn't actually mean anything. XML is not the proverbial hammer to wack nails, screws, and hooks with, but it does have its uses. For us, it is best used with its transformation ability with XSLT. When we first started work with it we found that it did not help with many of the things we do however.

      Personally I have come up with my own little XML definition to help seperate content and display. I am putting together the classic "see my cats" page at home, and also having other applications like webmail and budget database on my website for myself. One thing that is really nice is to be able to change just the XSL stylesheet for processing the XML to change then entire feel for the site. Like if I change the forms handler, I just change the transformation for the forms and all forms will look similar, instead of having some with a particular feel and others with a different feel.

      Ofcourse, ymmv, but XML is not cursed simplely because it is a buzzword.

      --
      Norris/Palin 2012
      Fact: We deserve leaders who can kick your ass and field dress your carcass.
    3. Re:but where is it used ? by spruce · · Score: 2, Interesting

      Here's an example I worked on that sort of helped me see the light for one use of XML.

      I did contract work for the state for a while and they wanted to do some credit card processing but didn't want to deal with the liability so we contacted a large company to handle that. They provided an XML interface where we sent them descirptions of the items we wanted charged, along with some other goodies including a return address to our site so we could handle their response XML.

      So we accepted some HTML form input, built a server side XML document and sent it to them, they processed it, and then sent us an XML result.

      While there are a lot of ways this could be accomplished, this was pretty easy and platform independent since XML is really just string data.
      It's going to be used for backend processing mostly, and then for the UI you render it with XSL, or custom server side code in our case.

  2. Darn DTD's by HillClimber · · Score: 5, Interesting

    As someone who's just downloading the XML Mind editor and about to write an .xsd for my data -- this is great timing! Thanks, Dare.

    I also want to gripe a bit about the complexity of XML Schema. DTD has all the restrictions I'd typically want to use (the main thing I want to do is just specify element names, contents, and attributes). The *only* problem with DTD's is that they are totally namespace-challenged!

    You can't use combine two DTD's for different namespaces into a combo document. You can't even allow arbitrary other elements in a DTD element declaration -- every element must be declared and local. Even worse, you have to pick and stick with a namespace prefix in your DTD -- defeating the whole point of globally unique namespaces.

    What I *really* want is just DTD with a smidge of namespace smarts and the ability to combine DTD's for one document. Anyone want to give it a shot?

    1. Re:Darn DTD's by bay43270 · · Score: 3, Interesting

      What I *really* want is just DTD with a smidge of namespace smarts and the ability to combine DTD's for one document. Anyone want to give it a shot?

      I think this is what everyone wants. The problem is, aside from Microsoft, no one can just make up a standard that contradicts the W3C and expect it to be accepted.
  3. Someone give a copy to Microsoft... by T-Kir · · Score: 3, Interesting

    ...no seriously, then they might actually follow the standards that are out there (i.e. their supposed use of 'proper' XML in Longhorn).

    Actually, maybe not. If they do have an O'Reilly Zoo, maybe the animals/books have been re-engineered into abominations... and then they follow what has been rewritten to produce anything.

    Well I suppose Long"Horn" could be an animal derivative; the bit that MS chops off and gives to the customers.

    --
    Are you local? There's nothing for you here!
  4. Re:Nitpick of the day... by Daniel+Dvorkin · · Score: 4, Interesting
    XSD is not a "language" any more than XML is. XSLT I suppose can be considered one.

    ...

    It's akin to those Costco salespeople who tell me that the "shweet" HP computer over there has 20GB of "RAM". It looks a bit dumb given the target audience.
    Um ... you do know what the "L" in "XML" stands for, right?

    XML is a language. So is HTML. So is SQL. Just because a language isn't Turing-complete doesn't make it not a language.

    Actually, I agree with you that XSD isn't a language -- it's a specific set of rules for using a language, XML; it would be better to call it a grammar. But saying "___ isn't a language" because ___ doesn't do everything C does is as silly as the "MySQL isn't a database (management system)" crap that floats around here every so often.

    I think the target audience is sophisticated to understand the difference between a language that's Turing-complete and one that isn't, and also to know that markup languages are still languages by any reasonable definition of the word.
    --
    The correlation between ignorance of statistics and using "correlation is not causation" as an argument is close to 1.
  5. Re:Just Say NO! by Anonymous Coward · · Score: 2, Interesting

    I cant think of a 'perfect' solution for anything that involved regular expressions to a large degree, unless you are a dedicated perl addict. The perfect solution would be one that everyone would adopt regardless of political standing or implementation details like.
    "Now that RELAX NG is an ISO/IEC DIS, I think that we should prefer RELAX NG
    to XML Schema."
    (http://www.imc.org/ietf-xml-use/mail-archive/msg0 0231.html)

    HMM, Glad I decoupled the use of W3C schemas in my application early on, or I would certainly be in a pickle now! Oh wait, I didnt, DAMN!

  6. Re:Among other things, XML is used for APIs by Anonymous Coward · · Score: 1, Interesting

    Which was very important in the days when business machines were linked by 24k modems. With that limitation mostly removed from b2b and a2a, XML looks like a better solution in most cases. A little parsing overhead is not going to impact most apps, XML parsers can be very efficient.

  7. Re:Article Motivation by Anonymous Coward · · Score: 1, Interesting

    I'm sorry, but I am not at all convinced by the Mozilla recommendations. I have worked with aCC under HP-UX and it has none of the problems he attributes to "HP-UX".

    Also, I noted a recommendation based on Visual C++ 1.5. I'm sorry, but that one is stone age! If you are so desperate to support every C++ ever written I imagine you will have major trouble porting newer C++ features, but that really is not necessary if you use recent versions of the various compilers.

  8. Re:Patents by __past__ · · Score: 3, Interesting
    Nobody (in their right mind) bashes the W3C because they are a bunch of evil corporate drones. People bash it because the W3C has created too much overengineered, half-working, overly complex and generally crappy specs recently, without listening to valid complaints from their actual users.

    XSD is one example that is particularly nasty because the W3C seems to plan forcing it in every other spec they create (for example XSLT 2.0, XQuery, RDF/OWL), making them very hard to implement (how many conformant XSD implementations are there? For languages other than Java?)

  9. Re:Article Motivation by Ed+Avis · · Score: 3, Interesting

    I haven't yet seen convincing explanations of why the new schema languages like XML Schema are needed at all. Or at least, I can't see that 'nice to have' features like specifying restrictions on textual element content outweigh the huge extra complexity compared to its predecessor.

    There is already an XML schema description language, called DTD. It is less powerful than XML Schema or Relax NG or DSD or a dozen other edifices of overengineering, but by the 80/20 rule it's likely to do what you need. The tools to validate against a DTD (nsgmls) are already included with most Linux systems. And you can learn all you need to know in about one page.

    XML Schema might be useful for some applications, and being a W3C standard does give it some extra clout (DTD is a W3C standard too, part of the XML specification), but it looks like second-system syndrome to me.

    --
    -- Ed Avis ed@membled.com