java - Can the IDREF attribute have only local ID value? -
i have such element
<xsd:element name="car" type="cartype"/> <xsd:complextype name="cartype"> <xsd:complexcontent> <xsd:extension base="basictype"> <xsd:attribute name="motor" type="xsd:idref" use="required"/> </xsd:extension> </xsd:complexcontent> </xsd:complextype> when motor element in current document, work fine.
<car id="car1" motor="motor1"/> <motor id="motor1"/> but when import motor element file
<beans:bean:import resource="motors.conf.xml"/> intellij thought invalid id reference, , when run programme exception
there no id/idref binding idref may i'm doing wrong? or may xsd:idref equals ref local, , can't utilize import?
i right, xsd:idref equals ref local.
about xsd:idref msdn creating valid id, idref...
and can see why equals here -
<xsd:element name="ref"> <xsd:annotation> <xsd:documentation><![cdata[ defines reference bean in mill or external mill (parent or included factory). ]]></xsd:documentation> </xsd:annotation> <xsd:complextype> <xsd:complexcontent> <xsd:restriction base="xsd:anytype"> <xsd:attribute name="bean" type="xsd:string"> <xsd:annotation> <xsd:documentation><![cdata[ name of referenced bean. ]]></xsd:documentation> </xsd:annotation> </xsd:attribute> **<xsd:attribute name="local" type="xsd:idref">** <xsd:annotation> <xsd:documentation><![cdata[ name of referenced bean. value must bean id , can checked xml parser. hence preferred technique referencing beans within same bean mill xml file. ]]></xsd:documentation> </xsd:annotation> </xsd:attribute> <xsd:attribute name="parent" type="xsd:string"> <xsd:annotation> <xsd:documentation><![cdata[ name of referenced bean in parent factory. ]]></xsd:documentation> </xsd:annotation> </xsd:attribute> </xsd:restriction> </xsd:complexcontent> </xsd:complextype> </xsd:element> it description of element bean element ref. , know, can utilize <ref local> elements in current xml document.
java spring import xsd
No comments:
Post a Comment