Re: Using xsd:type in xml files

Hi Nicolas,

I read your post between lines, but it seems that you are looking for 
xsi:type where xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance".

Best Regards,
George
---------------------------------------------------------------------
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com


Nicolas Mailhot wrote:
> Hi all,
> 
> I'm till trying to make sense of my problem xsd:( Actually the problem is
> still centered on the same elements.
> 
> The xsd declares an element foo of complextype foo, then several elements
> bar_x of complextype bar_x where bar_1, bar_2... are all derived by
> extension from foo. (this is where we had the named complextype inside
> named element before - I just extracted the complextypes declarations and
> put them on the top level)
> 
> The xml files to validate then use
> 
> <foo xsd:type="whatever:bar_1"/>
> <foo xsd:type="whatever:bar_2"/
> 
> to distinguish between all those foo variations.
> 
> My validator chokes on xsd:type and tells me it's not allowed there.
> 
> On my own I'd urge to use the named elements since we've declared them,
> but I'd like to make sure no sort of trickery involving xsd:type is
> possible (since whoever choose this construct must have had a good reason
> to - at least I hope so). Is the problem just that the foo element do not
> declare xsd:type as an allowed attribute or is this use totally contrary
> to the xsd spirit ?
> 
> Regards,
> 

Received on Monday, 11 April 2005 08:57:52 UTC