I have the following to transform a XSD that is a standard
for market data ( mddl.org)
There are many errors here beyond those that have been mentioned so far.
<xsl:when test="//xsd:group[ends-with(@ref, '.children')]">
<xsl:variable name="elementName" select="@name"/>
Your context node is the root (document) node. Document nodes don't have
attributes. I'm not sure which element's @name attribute you are after here.
/xsd:group selects an xsd:group element that's at the top-level of the
document. But the top-level element of your input document is always
xsd:schema. Also, xsd:group elements in a valid schema document can't have
children called "child". Perhaps you meant "*"?
You've created two attributes, but you haven't yet created an element for
them to be attached to.
<xsl:when test="/xsd:complexType and
The outermost element will never be xsd:complexType
and child/child::xsd:choice and
This is made-up syntax, and I'm starting to have great trouble guessing what
you might mean by it. Perhaps child::*/child::*[self::xsd:choice] -
but I'm guessing (like you are).
I suspect these were meant to be predicates - so use  rather than () - and
a predicate can't immediately follow a "/"
<!-- Iterate thru all elements adding min=0 and
It looks to me as if you are somehow imagining that you can add attributes
to elements in the source document. You can't. Remember that XSLT doesn't
modify the source - you are creating a result document, and if you want to
copy something, you have to do so explicitly.
You say yourself this is "fairly complex XSLT". I'd suggest you try to write
something simpler first - you're trying to run before you can walk.
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>