You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Jean-Sebastien Delfino <js...@apache.org> on 2007/01/01 23:57:04 UTC

Re: [SDO] Literal value support, especially for anyType/anySimpleType

Yang ZHONG wrote:
> I'm working on http://issues.apache.org/jira/browse/TUSCANY-451,
> which may need us to support literal value.
> What's your opinion?
>
> Although the issue was opened against C++,
> it also applies to other programming languages including Java since 
> it's a
> issue of XML and its memory representation.
>
> Given XSD:
>    <element name="anySimpleType" type="anyType"/>
> and XML:
>    <anySimpleType>anyType literal value</anySimpleType>
>
> Since no concrete type info such as int/string and so on to parse out a
> memory representation, literal value may need to be stored.
> Do you have alternative(s) to keep fidelity?
>
> Literal value support can benefit performance too. Parsing literal 
> value for
> the memory representation can be deferred until a user accesses the 
> value.
> On the other hand, (weakly) referencing literal value after parsing 
> can make
> saving as XML instant.
> Do you agree with the 2-way performance gain?
>
>
> Happy New Year.
>
Yang,

What do you mean by storing the literal value?

In the absence of any type info shouldn't the element content just be 
stored as a string?

Thanks,

-- 
Jean-Sebastien


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: [SDO] Literal value support, especially for anyType/anySimpleType

Posted by Simon Laws <si...@googlemail.com>.
On 1/2/07, Yang ZHONG <le...@gmail.com> wrote:
>
> 451 has illustrated the element content isn't stored.
>
> On 1/1/07, Jean-Sebastien Delfino <js...@apache.org> wrote:
> >
> > Yang ZHONG wrote:
> > > I'm working on http://issues.apache.org/jira/browse/TUSCANY-451,
> > > which may need us to support literal value.
> > > What's your opinion?
> > >
> > > Although the issue was opened against C++,
> > > it also applies to other programming languages including Java since
> > > it's a
> > > issue of XML and its memory representation.
> > >
> > > Given XSD:
> > >    <element name="anySimpleType" type="anyType"/>
> > > and XML:
> > >    <anySimpleType>anyType literal value</anySimpleType>
> > >
> > > Since no concrete type info such as int/string and so on to parse out
> a
> > > memory representation, literal value may need to be stored.
> > > Do you have alternative(s) to keep fidelity?
> > >
> > > Literal value support can benefit performance too. Parsing literal
> > > value for
> > > the memory representation can be deferred until a user accesses the
> > > value.
> > > On the other hand, (weakly) referencing literal value after parsing
> > > can make
> > > saving as XML instant.
> > > Do you agree with the 2-way performance gain?
> > >
> > >
> > > Happy New Year.
> > >
> > Yang,
> >
> > What do you mean by storing the literal value?
> >
> > In the absence of any type info shouldn't the element content just be
> > stored as a string?
> >
> > Thanks,
> >
> > --
> > Jean-Sebastien
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> >
> >
>
>
> --
>
> Yang ZHONG
>
> Hi Yang

451 was logged as a result of running the interop schema (
https://svn.apache.org/repos/asf/incubator/tuscany/interop/src/main/resources/interop50-in.xml).
AFAIK this is still an issue but I can't check because my laptop is messed
up (I'm trying to fix it now:-). When I ran the test as described the result
was that whatever data appeared on the input was not reflected on the
output. I don't know if this is because it's not actually stored internally
in SDO or because it's not written out when the time comes to recreate the
XML from the SDO.

I don't know off the top of my head how SDO deals with anyType. Looking at
the schema parser code
(https://svn.apache.org/repos/asf/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOSchemaSAX2Parser.cpp
) it doesn't seem to take any special notice of "anyType". I may of course
be looking in the wrong place. I would assume it would have to do something
similar to the way that it handles "any" elements, i.e.open content. The
difference is that you already have a property name in the element that is
defined as being of "anyType". So you would have to generate a type for this
property with open content and assume that it is also mixed  to handle the
case that  either  simple type, complex type or  both types of data have to
be represented within this property.

To move this along a bit can you could take a look and see if there is any
of this kind of function in the implementation as it stands.

Regards

Simon

Re: [SDO] Literal value support, especially for anyType/anySimpleType

Posted by Yang ZHONG <le...@gmail.com>.
451 has illustrated the element content isn't stored.

On 1/1/07, Jean-Sebastien Delfino <js...@apache.org> wrote:
>
> Yang ZHONG wrote:
> > I'm working on http://issues.apache.org/jira/browse/TUSCANY-451,
> > which may need us to support literal value.
> > What's your opinion?
> >
> > Although the issue was opened against C++,
> > it also applies to other programming languages including Java since
> > it's a
> > issue of XML and its memory representation.
> >
> > Given XSD:
> >    <element name="anySimpleType" type="anyType"/>
> > and XML:
> >    <anySimpleType>anyType literal value</anySimpleType>
> >
> > Since no concrete type info such as int/string and so on to parse out a
> > memory representation, literal value may need to be stored.
> > Do you have alternative(s) to keep fidelity?
> >
> > Literal value support can benefit performance too. Parsing literal
> > value for
> > the memory representation can be deferred until a user accesses the
> > value.
> > On the other hand, (weakly) referencing literal value after parsing
> > can make
> > saving as XML instant.
> > Do you agree with the 2-way performance gain?
> >
> >
> > Happy New Year.
> >
> Yang,
>
> What do you mean by storing the literal value?
>
> In the absence of any type info shouldn't the element content just be
> stored as a string?
>
> Thanks,
>
> --
> Jean-Sebastien
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
>


-- 

Yang ZHONG