[
https://issues.apache.org/jira/browse/WSCOMMONS-124?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ajith Harshana Ranabahu resolved WSCOMMONS-124.
-----------------------------------------------
Resolution: Fixed
Fixed - The argument about the NCName seems valid according to the spec
> XmlSchemaElement.getName with ref attribute
> -------------------------------------------
>
> Key: WSCOMMONS-124
> URL: https://issues.apache.org/jira/browse/WSCOMMONS-124
> Project: WS-Commons
> Issue Type: Bug
> Components: XmlSchema
> Reporter: Arnaud MERGEY
>
> Hi,
> Parsing element like this <xs:element ref="types:SnpCol">
> * In XmlSchema 1.0.3 XmlSchemaElement.getName return "SnpCol"
> * In XmlSchema 1.1 XmlSchemaElement.getName return "types:SnpCol"
> According to John answer in the mailing list:
> according to the schema for W3C XML Schema at
> http://www.w3.org/2001/XMLSchema.xsd the 'name' attribute of <element> is
> xs:NCName so I think the behaviour you see with XmlSchema 1.0.3 is correct.
> I think the problem with XmlSchema 1.1 is in SchemaBuilder.handleElement:
> } else if (el.getAttributeNode("ref") != null) {
> String refName = el.getAttribute("ref");
> element.setRefName(getRefQName(refName, el));
> element.name = refName;
> refName is a prefixed string so maybe the last line should say:
> element.name = element.refName.getLocalPart().
> It looks like original code in this method obtained the local part from
> refName::
> refName = Tokenizer.lastToken(refName, ":")[1];
> element.setRefName(new QName(namespace, refName));
> element.name = refName;
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]