I think it makes a lot of sense. I dont currently have an "isQName" flag,
but I do have a whole lot of flags such as "isFromList" which tell me that
the original many-valued element was loaded from a XSD <list> element. ( I
have implemented <list> as a single valued element with a property called
"values", but it looks to the DataObject API like a multi-valued element
with no properties).
I agree that there is a more general need toretain more context upwards from
XSD to DataFactory.
Is anyone else having similar requirements?

regards,
Ed.


On 21/04/06, Pete Robbins <[EMAIL PROTECTED]> wrote:
>
> The current SDO implementation handles the mapping of QName to the SDO Uri
> type as per the specification. So if I use XSDHelper to load a schema
> which
> defines a property as type xs:QName, e.g.        <xs:attribute name="joe"
> type="xs:QName" />    then use XMLHelper to load my xml containing ..<..
> joe="ns1:fred" xmlns:ns1="myNS"...> then the value stored in the DO is
> "myNS#fred". All fine... this is as it should be according to the spec.
>
> My problem is that I want to define the types programatically rather than
> using XSDHelper using DataFactory::addPropertyToType(....). There is no
> way
> to say "treat this as a QName" so when I use XMLHelper to load my xml the
> value stored in the DO is "ns1:myNS".
>
> Should there be an interface to add schema information to a Property (or
> Type)? As well as "isQname" there are other attributes available from a
> schema that can not be added using the current API such as "isElement"
> "isAttribute" to control the serialization to an element/attribute.
>
> Does this make sense?
>
> --
> Pete
>
>

Reply via email to