Michael Kay wrote:
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.
Incidentally, attributes should be regarded as unordered: the concept of
"the third attribute" is not very meaningful.
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.
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
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--