-
15. Re: xsd:attribute ref unsupported in unmarshaller
anil.saldhana Aug 15, 2007 12:50 PM (in response to anil.saldhana)Based on your test case, I have also tried the global name space route, in vain.
-
16. Re: xsd:attribute ref unsupported in unmarshaller
aloubyansky Aug 15, 2007 2:01 PM (in response to anil.saldhana)Could you please modify the xml by adding the namespace prefix to the flag attribute and enable trace for org.jboss.xb.binding.sunday.unmarshalling.XsdBinder? It'll show how the attribute is bound.
-
17. Re: xsd:attribute ref unsupported in unmarshaller
anil.saldhana Aug 15, 2007 3:57 PM (in response to anil.saldhana)Sorry, I read your post incorrectly. Modifying the xml (and not the xsd ) with a specific prefix on the flag attribute works, but it will be difficult for users to pick that approach (specify attribute code with no namespace prefix and flag with a prefix).
Since I need to just externalize the type, I can get it to work with:<xsd:simpleType name="module-option-flag"> <xsd:restriction base="xsd:string"> <xsd:enumeration value="required"/> <xsd:enumeration value="requisite"/> <xsd:enumeration value="sufficient"/> <xsd:enumeration value="optional"/> </xsd:restriction> </xsd:simpleType> <xsd:complexType name="loginModuleInfo"> .... <xsd:attribute name="code" type="xsd:string" use="required"/> <xsd:attribute name="flag" type="jbsx:module-option-flag" use="required"/> </xsd:complexType>
I can move on. -
18. Re: xsd:attribute ref unsupported in unmarshaller
aloubyansky Aug 15, 2007 4:30 PM (in response to anil.saldhana)That's not an XB issue. This is XSD thing.
-
19. Re: xsd:attribute ref unsupported in unmarshaller
anil.saldhana Aug 16, 2007 3:46 PM (in response to anil.saldhana)Is the following an XSD issue?
<xsd:attribute ref="jbsx:flag" use="required"/>
That was the original issue that I had. You showed me that by namespace prefixing the flag attribute in the xml file, the issue does not exist.
Can you please enlighten me? :)
Why would the following work without any ns prefix in the xml:<xsd:element ref="jbsx:something" />
but not the attribute ref?
I am just curious. -
20. Re: xsd:attribute ref unsupported in unmarshaller
aloubyansky Aug 17, 2007 3:11 AM (in response to anil.saldhana)Top level attributes are bound to the schema's target namespace. While local attributes are bound according to the value of their form attribute or schema's attributeFormDefault attribute (which is unqualified by default)
http://www.w3.org/TR/xmlschema-1/#declare-attribute
And specifically in your schema attributeFormDefault is unqualified and the elementFormDefault is qualified.