users@jaxb.java.net

Re: Problems with xml binding in SensorML schema

From: Peizhao Hu <peizhao_at_itee.uq.edu.au>
Date: Tue, 17 Apr 2007 17:46:57 +1000

Hi Hank,

thank you for trying.
yes, I am still working on SensorML schema, however I can't get much
progress.
I stopped a bit and working on another part of my system. looks good
news for me, thanks.
I will try to parse it. keep you informed if I make any progress.

regards;

Peizhao



Hank Ratzesberger wrote:
> I tried this with the latest release, and I am able to
> get past the initial conflict with an inline <jaxb:property>
> customization. So, SensorML, it appears, will parse OK.
> However, I get over a dozen conflicts with GML 3.1.1 which
> I have not fixed yet.
>
> Let me know if you are still working on this.
>
> And thanks to Koshuke.
>
> --Hank
>
> Hank Ratzesberger
> Institute for Crustal Studies
> University of California, Santa Barbara
> 805.893.8042
> 805.893.8649 (fax)
>
>
> ----- Original Message ----- From: "Peizhao Hu" <peizhao_at_itee.uq.edu.au>
> To: <users_at_jaxb.dev.java.net>
> Sent: Wednesday, March 14, 2007 7:55 PM
> Subject: Re: Problems with xml binding in SensorML schema
>
>
>> I tried many different ways of XPath, however, none of them working.
>>
>> I tried:
>> "/xs:schema/xs:element[@name='GeoLocationArea']/xs:complexType/xs:complexContent/xs:sequence/xs:extension/xs:attribute[@name='name']"
>>
>> "//xs:element[@name='GeoLocationArea']/xs:complexType/xs:complexContent/xs:sequence/xs:extension/xs:attribute[@name='name']"
>>
>> "//xs:schema//xs:element[@name='GeoLocationArea']//xs:complexType//xs:complexContent//xs:sequence//xs:extension//xs:attribute[@name='name']"
>>
>> "//xs:schema//xs:element[@name='GeoLocationArea']//xs:complexType//xs:complexContent//xs:extension//xs:attribute[@name='name']"
>>
>>
>> same error saying empty target node.
>>
>> parsing a schema...
>> [ERROR] XPath evaluation of
>> "/xs:schema/xs:element[@name='GeoLocationArea']/xs:complexType/xs:complexContent/xs:sequence/xs:extension/xs:attribute[@name='name']"
>> results in empty target node
>> line 2 of
>> file:/home/phu/programming/SensorML_examples/SensorMLV1.0/sweCommon/1.0.0/binding.xjb
>>
>>
>> [ERROR] Property "Name" is already defined. Use &lt;jaxb:property> to
>> resolve this conflict.
>> line 105 of
>> file:/home/phu/programming/SensorML_examples/SensorMLV1.0/sweCommon/1.0.0/positionTypes.xsd
>>
>>
>> [ERROR] The following location is relevant to the above error
>> line 52 of http://schemas.opengis.net/gml/3.1.1/base/gmlBase.xsd
>>
>> regards;
>>
>> Peizhao
>>
>>
>>
>> Hank Ratzesberger wrote:
>>>
>>> When the JAXB parser tries to create a property matched
>>> to the attribute "name" it conflicts with a default property
>>> every generated class has, which is Name, i.e., the name of
>>> the element.
>>>
>>> I suspect you will need to work out several bindings to
>>> work around this issue. Sorry, but I can only guess what
>>> the xpath statement you will need to
>>>
>>> <jxb:bindings
>>> node="/xs:schema/xs:element[@name='GeoLocationArea']/xs:complexType/xs:complexContent/xs:sequence/xs:extension/xs:attribute[@name='name']">
>>>
>>> <jxb:class name="NameAttr"/>
>>> </jxb:bindings>
>>>
>>> Are you certain that no attribtute "name" is inherited ?
>>>
>>> HTH,
>>> Hank
>>>
>>> Hank Ratzesberger
>>> Institute for Crustal Studies
>>> University of California, Santa Barbara
>>>
>>>
>>>
>>> ----- Original Message ----- From: "Peizhao Hu"
>>> <peizhao_at_itee.uq.edu.au>
>>> To: <users_at_jaxb.dev.java.net>
>>> Sent: Tuesday, March 13, 2007 9:05 PM
>>> Subject: Problems with xml binding in SensorML schema
>>>
>>>
>>>> Hi,
>>>>
>>>> the full schema can be found at
>>>> http://vast.uah.edu/joomla/index.php?option=com_content&task=view&id=114&Itemid=80
>>>>
>>>>
>>>> when I try to bind sensorML/1.0.0/base/sensorML.xsd by command
>>>>
>>>> xjc.sh sensorML.xsd
>>>>
>>>> it generated errors with
>>>>
>>>> <Error> Property "Name" is already defined. Use <jaxb:property> to
>>>> resolve this conflict.
>>>> line 102 of sweCommon/1.0.0/positionTypes.xsd
>>>>
>>>> the hint is very obvious, however, I have no idea how to customise it.
>>>>
>>>> can anyone help?
>>>>
>>>> --
>>>>
>>>> regards;
>>>>
>>>> Peizhao
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
>>>> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
>>> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
>> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>