This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
Hey all, I'm using JAXP to obtain a DOM parser implementation. I'd like to avoid specifying the XSD in the schemaLocation attribute of the XML document and specify the XSD that the parser should use at runtime. Any ideas on how this can be done? Thanks, John
Schemas are more flexible. The schema specification specifically allows for a variety of different means for associating documents with schemas. For instance, one possibility is that both the name of the document to validate and the name of the schema to validate it against could be passed to the validator program on the command line like this: C:\>validator greeting.xml greeting.xsd Parsers could also let you choose the schema by setting a SAX property or an environment variable. Many other schemes are possible. The schema specification does not mandate any one way of doing this. However, it does define one particular way to associate a document with a schema. As with DOCTYPE declarations and DTDs, this requires modifying the instance document to point to the schema. The difference is that with schemas, unlike with DTDs, this is not the only way to do it. Parser vendors are free to develop other mechanisms if they want to.
William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.