[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [sca-assembly] Issue 123
If the type is xsd:string with mixed='true' then the following will not
be valid:
<value>
<someValue>
<someSubelement>...</someSubelement>
</someValue>
</value>
The <value> element is meant to allow "inlining" of simple type values
as well as elements whose type is complex. A true 'mixed' type isn't
what we want to allow but instead allow either inlined text (such as a
string, int etc) or element(s) but not both. I.e. the following won't be
allowed (by SCA not by schema):
<value>
This is some value <ele>another value</ele>
</value>
I know the current schema allows this, but I don't of a way to design
the schema to prevent it.
-Anish
--
ashok malhotra wrote:
> The XML Schema primer http://www.w3.org/TR/xmlschema-0/
> has an example of how to define an element that can contain mixed content.
> This is exactly the same as Mike Edwards' suggestion except that the
> sequence is
> typed as xsd:string rather than xsd:any.
>
> I suspect Mike used ##any to allow simple data values but that not helpful.
> because you don't know what the simple types are and cannot validate them.
> Thus 5.0 will look like a string in any case. The simple types will be
> validated
> in the specific context where they are used.
>
> Thus, unless Mike has other reasons to prefer ##any, xsd:string seems
> simpler and equally effective.
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]