[Xml-compile] Adding namespaced attributes to elements
Mark Overmeer
mark at overmeer.net
Mon Aug 18 20:08:04 BST 2008
* Drew Taylor (drew at drewtaylor.com) [080818 11:45]:
> Yes, it is within a mixed content schema. This is from the XFT schema.
> Please don't get me started on how incredibly complex this schema is.
I have seen worse ;-)
These are fun:
<xs:sequence minOccurs="0">
<xs:group ref="CardGroup" minOccurs="0"/>
</xs:sequence>
Optional repetition of optional groups.
Using groups in such number is not really nice: elements of these
groups get onto the same level in the message, losing their
structural grouping where a nesting is much clearer. It is
probably caused by abusing some design tool.
> I don't understand why they chose to go with types of the same
> element rather than creating a new element which referenced the
> appropriate complexType. You can imagine how I felt when I saw what I
> had to work with. :-(
This is the trick to permit substitutionGroups: people are suggested
to declare all elements which may get extended with such element-level
unions on the top-level, and use refs to them. It is clean, but you
can overdo it easily.
> Just for kicks I tried s/mixed="true"/mixed="false"/g since I can live
> without the text content, but (not surprisingly) that caused massive
> trouble in the form of deep recursion errors.
This is the same effect as using the "mixed_elements => 'STRUCTURAL'".
It should not get into deep-recursions, because I do catch those
situations (I believe). If you can reproduce it, I would like to
get a bug-report for that (data files off list).
>From what I see, mixed="true" seems weird: everything is so well defined.
I can not imagin that the mixed on that element level is being used.
So, send me a bug-report to be able to use 'STRUCTURAL' ;-)
--
Regards,
MarkOv
------------------------------------------------------------------------
Mark Overmeer MSc MARKOV Solutions
Mark at Overmeer.net solutions at overmeer.net
http://Mark.Overmeer.net http://solutions.overmeer.net
More information about the Xml-compile
mailing list