gml:name were only an example

I think the thing is more of gtxml not handling attributes for any type with a 
simple content model.

The option, creating custom bindings for every type in an application schema 
seems just unacceptable.

So I meant if gtxml shouldnt have a way to treat xml attributes for complex 
types with simple content models (aka, simple types + attributes), or if it 
does, how?

hope I'm explaining it well..

Gabriel

On Wednesday 09 May 2007 16:56, Justin Deoliveira wrote:
> Hi Gabriel,
>
> My original message was a bit off. After looking into this some more it
> seems that "gml:name" is a "CodeType", which is indeed a complex type
> which extends a simple type. However there is no binding directly to
> gml:name or to "gml:CodeType", so the "xs:string" binding si the first
> one to execute.
>
> So if you register a binding for the "CodeType" type, you should get
> what you need as its a ComplexBinding.
>
> -Justin
>
> Gabriel Roldán wrote:
> > Hi Justin,
> >
> > Working on gtxml encoding and now parsing I guess I've found a design
> > limitation, though it can well be a limitation on my brain.
> >
> > Problem is I'm not being able of encoding non complex (in the nesting
> > sense) elements with xml attributes.
> >
> > Say I have to encode gml:name but it needs the codeSpace attribute:
> >
> > <gml:name codeSpace="myuri">value</gml:name>
> >
> > This kind of encodings are generally made through a SimpleBinding,
> > which, by one side, have no getProperty() method which could be used to
> > retrieve the attribute values, and by the other side,
> > SimpleBinding.encode() is expected to return an String and does not
> > recieves the Element it is going to be encoded at, so it is not possible
> > to set the attributes in the encode() implementation.
> >
> > Moreover, the Encoder seems to never try to encode the attributes when
> > it is a SimpleBinding.
> >
> > By trying to overcome this limitation, I've made a custom binding for
> > xs:anySimpleType, which is a ComplexBinding instead of a SimpleBinding.
> > It was working alright for encoding, as that way I can set the
> > attributes inside encode().
> >
> > The problem arises when I send a HTTP POST GetFeature request, since it
> > uses the parser to build the request object, then ParseExecutor fails
> > with a ClassCastException at line 132, trying to cast an AttrtibuteImpl
> > to an ElementInstance.
> >
> > Hope I'm making some sense, in any case, feel free to contact me through
> > im as soon as you have a chance.
> >
> > regards,
> >
> > Gabriel
> >
> >
> > ------------------------------------------------------------------------
> >
> > -------------------------------------------------------------------------
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Geotools-devel mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/geotools-devel

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to