[Home] [By Thread] [By Date] [Recent Entries]
Michael Kay wrote:
I agree with this statement. I do XSD processing in XSLT (to validate the XSD against internal standards) and I find it challenging and sometimes painful.Well, in principle an XML Schema document is XML so you can use it as an input to your stylesheet. But it's not easy to process unless you know the coding standards that have been followed, because there are many different ways of writing equivalent schemas. The next Saxon release will offer an "predigested" XML representation of the schema component model that aims to help with that. As stated above (putting aside the valid point about there being no such thing as a third attribute) the problem is there are so many ways you can represent these three attributes in xsd. For example, you can create Complex types that specify 3 attributes, and reference this complex type in your element class, you can use an extension, or you can specify it directly in the element. Additionally, you can specify class in an import and or in an include (depending on whether there is a namespace). Now if you are in control of the XSD, it should be fine, but if you are not, I recommend you think twice before you using XSLTs to do this sort of processing. But if you do, have fun. Michael, Can you further elaborate on the changes to Saxon you mentioned above? Cheers. -- Kamal Bhatt
|

Cart



