Originally posted by Jothi Shankar Kumar Sankararaj: XSL defines the style of the xml document. Did I get this wrong?
Maybe xml schema/DTD....which one would be ideal for XML validation?
XSL are for structuring of xml's . true , very true.
I have never seen XSL are validated.I think well formness in this case is enough. I have also not worked much on XML , so lets wait for an expert to comment on this. Anyways wish me luck , I am appearing IBM 142 tomorrow.
>>XSL defines the style of the xml document. Did I get this wrong?
Maybe xml schema/DTD....which one would be ideal for XML validation?>>
XSL Transformations can be used, for example, to generate an HTML version of your XML document. For XML validation, DTD or XSD (Schema) may be used. Schema allows for better control of occurence, types etc.
Quoting from the Developer works article (Part 2 of 5)
".. You can design an XML Schema to constrain your document to a greater degree than is possible by using the DTD. For example, an XML Schema grammar can specify that exactly four apple elements must always be the immediate children of a basket element. You can define complex types, building on string types. For instance, you could require a zipcode element to have a pattern facet of value "\d\d\d\d\d-\d\d\d\d", so that values such as "95123-4823" are valid, but "abcde-fghi" or "27703" are invalid..."
Here's the link to the 5 part prep series:
Test Prep [ June 11, 2007: Message edited by: Shapra Benglur ]