http://qs321.pair.com?node_id=31700


in reply to RE: Doctype specific XML Validator
in thread Doctype specific XML Validator

Given that the whole point of XML is to leave room for expansion, my impression is that an individual or company can create a "proprietary" DTD (a document type definition) that describes their own XML format. Each format can include different types of objects. For an example, go to Moreover.com, click on the developers link, and compare the different formats that are based on XML. For instance, there's Netscape's definition called RSS, and there's Moreover.com's own format. You may also want to take a look at the W3C Web site for some of the actual specs on XML and other related technologies like XPath and XSL (both of which are really cool).

Because of the structure of XML itself, pretty much any format is easy to parse. It's just a matter of picking a way to parse it in Perl and then accessing the data. Most often, a person wishing to parse an XML document would use one of the styles in XML::Parser. For instance, one can use the stream style by setting handlers or the the objects style.

So, it's not really a matter of the individual or company wanting to make XML "their own." RSS and other definitions have come about because of the desire to have a common format so that headlines can be passed between sites on the Web (e.g. Slashdot and Freshmeat). XML's intrinsic flexibility allows individuals and companies to roll their own.

-ppm

Replies are listed 'Best First'.
RE: RE: RE: Doctype specific XML Validator
by BastardOperator (Monk) on Sep 09, 2000 at 03:32 UTC
    O.k. I'm with you, you're talking about the DTD's. I just wouldn't call that proprietary because..well..that's the point of DTD's. They're supposed to be customized. My impression from your post was that the XML specification (or components related to, such as DTD) had been changed to suite that company. Creating a DTD to specify what data is valid and what isn't is, of course, why XML is as good as it is.

    NOTE:
    For those who have no idea about XML, a DTD is a "Document Type Definition" which specifies how your data will be structured, what's valid, what's required, etc. XML::Parser and other _validating_ parsers will check an XML document against the specified DTD to ensure that it meets that specification, not all parsers do that (i.e. non-validating parsers). This is very well suited to many things, and is largely becoming an excellent way for different businesses to exchange information.

    NOTE2:
    We're all so darned geeky here that I'm sure nobody got anything out of that ;). Just lookin' out for the potential new guy.
      Right. I guess I shouldn't have said proprietary. I was merely sticking with the language used in your previous post. It's not really that the XML specification is changed when a company creates a DTD. A DTD just spcifiies a structure for data in an XML document. And yes, you are correct that creating a DTD is why XML is so cool.

      -ppm