XSD Type match for XSLT templates
Replies (1)
Please register to reply
Added by Anonymous about 14 years ago
Legacy ID: #8661276 Legacy Poster: David Lee (daldei)
If I were using one of the Schema Aware versions of Saxon, would this enable any kind of feature or expression where I could create a template that matched by XSD type instead of element name ? My goal is I would like to generate a XSLT from an XSD and part of the information driving the output may be the type, not the element, so the 'obvious' way would be to do something like <template match="type eq 'mytype'> But I have not found such a thing in the XSLT reference (which I admit I'm about 1% through ... Suggestions welcome !
Legacy ID: #8661405 Legacy Poster: Michael Kay (mhkay)
Yes, this can be a useful thing to do. The syntax you want is match="element(*, mytype)" Michael Kay Saxonica
Please register to reply