| Summary: | Global Attributes in XSD Schema | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Modeling] EMF | Reporter: | Frank Siegert <f.siegert> | ||||||
| Component: | XSD | Assignee: | Ed Merks <Ed.Merks> | ||||||
| Status: | RESOLVED INVALID | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | f.siegert | ||||||
| Version: | unspecified | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows Vista | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Frank Siegert
Created attachment 200236 [details]
XSD Schema using global attributes
test file to reproduce the error messages
Created attachment 200237 [details]
XML file using the XSD schema from test.xsd
test file to reproduce the error messages
The file isn't valid. The attribute must be qualified with its namespace. The declaration xmlns="..." only provides an implicit namespace for elements in the contained XML. They do not implicitly provide the namespace for attributes. So it's impossible to have a qualified attribute in the instance unless you use an explicit named prefix for that namespace. Thanks for pointing this out. To use global attributes unqualified I had to remove the target name space from the XSD schema. As a result in the instance document no name space needs to be defined and the XSD schema has to be referenced by xsi:noNamespaceSchemaLocation="...". |