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 <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
>