|
|
|
||
|
If you have been following along with the trials and tribulations of XSD, PSVI and non-native attributes then you have been left with wondering about case where you have a non-native attribute and no
<xsd:element name="something" myNS:name="Something" ...>
<xsd:simpleType>
..
</xsd:simpleType>
</xsd:element>
Since there is no So we're done, right? Well, no. The page from which the "generate synthetic annotations" is taken is actually for the SAX parser which is not what we use. A quick search of the intersection between To round this out, the synthetic annotation appears as: <xsd:annotation myNS:name="Something" ...> <xsd:documentation>SYNTHETIC_ANNOTATION</xsd:documentation> </xsd:annotation> and the setup code to get an
System.setProperty(DOMImplementationRegistry.PROPERTY,
"org.apache.xerces.dom.DOMXSImplementationSourceImpl");
final DOMImplementationRegistry registry =
DOMImplementationRegistry.newInstance();
final XSImplementation xsImpl =
(XSImplementation)registry.getDOMImplementation("XS-Loader");
final XSLoader schemaLoader =
xsImpl.createXSLoader(null/*all XML Schema Versions*/);
// NOTE: synthetic annotation nodes MUST be created for non-native
// attributes to be parsed and added to the XSAnnotation object
// (for cases where there is no
|
| Post a comment |
|
|
Unless otherwise expressly stated, all original material of whatever nature created by Rob Grzywinski and included in this weblog and any related pages, including the weblog's archives, is licensed under a Creative Commons License. |