You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org> on 2007/05/21 18:34:17 UTC
[jira] Resolved: (XERCESJ-1252) error msg on unqualified global
attribute confusing
[ https://issues.apache.org/jira/browse/XERCESJ-1252?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Glavassevich resolved XERCESJ-1252.
-------------------------------------------
Resolution: Duplicate
As George pointed out, this is a duplicate of XERCESJ-819.
> error msg on unqualified global attribute confusing
> ---------------------------------------------------
>
> Key: XERCESJ-1252
> URL: https://issues.apache.org/jira/browse/XERCESJ-1252
> Project: Xerces2-J
> Issue Type: Improvement
> Components: XML Schema Structures
> Affects Versions: 2.9.0
> Environment: XP Home/SP2; jre 1.5.0_11
> Reporter: Paul V. Biron
> Priority: Minor
>
> Given this simple schema document:
> <xs:schema
> xmlns:xs='http://www.w3.org/2001/XMLSchema'
> xmlns='urn:test'
> targetNamespace='urn:test'
> elementFormDefault='qualified'
> attributeFormDefault='unqualified'>
> <xs:element name='root' type='Root'/>
> <xs:complexType name='Root'>
> <xs:attribute ref='glob' use='required'/>
> </xs:complexType>
> <xs:attribute name='glob' type='xs:string'/>
> </xs:schema>
> and this simple instance:
> <my:root xmlns:my='urn:test' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
> xsi:schemaLocation='urn:test globAttr.xsd' glob='foo'/>
> xerces (correctly) reports the following 2 error msgs:
> [Error] globAttr.xml:2:58: cvc-complex-type.3.2.2: Attribute 'glob' is not allowed to appear in element 'my:root'.
> [Error] globAttr.xml:2:58: cvc-complex-type.4: Attribute 'glob' must appear on element 'my:root'.
> While this is correct (@glob should be qualified) you can imagine who those msgs would confuse a novice. It's not worth spending a lot of time improving the error messages, but if you can do it quickly it would probably help the uninitiated (suggestion: just prefix 'glob' in the 2nd message...but that might make it harder to understand in other circumstances).
--
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: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org