[Xml-compile] How to read an abstract element with xsi:type
attribute?
Roman Daniel
roman.daniel at davosro.cz
Sat Dec 19 15:10:53 GMT 2009
while parsing xml with abstract element substituted by concrete one I run
into a problem how to read:
<myabstractns:myAbstractElem xsi:type=3D"myconcretens:myConcreteType
attr=3D"value">
...some content
</myabstractns:myAbstractElem>
I have a schema containing the definition for myconcretens:myConcreteType,
but there is no element definition to create the reader for.
The only solution I was able to come up with is:
1) create new element by cloning the content of the original one
<myconcretens:newElementName attr=3D"value">
...some content
</myconcretens:newElementName>
2) create a new very simple schema with the definition
<xs:element name=3D"myconcretens:newElementName"
type=3D"myconcretens:myConcreteType"/>
and import it into my $xmlcompileschema
3) create the reader for "myconcretens:newElementName" and use it to read
the new element.
Rather cumbersome, isn't it? Does anybody know more elegant solution?
Thanks for any idea
Roman Daniel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/xml-compile/attachments/20091219/1b=
b289c0/attachment.htm
More information about the Xml-compile
mailing list