jbossas/jboss-as — pull request #3468 by sfcoy (2012-11-20 03:51:58+00:00)
Title: AS7-1264 Add schema references to standalone.xml, domain.xml, host.xml. ...

...Modify code to cope with parsing of same.

This turned out be more than just adding schemaLocation hints to the various xml files.

Both standalone.xml and domain.xml are composed from template files. The code that performs this assembly needed to be modified to preserve the various namespace declarations and schemaLocations.

Additionally, the code that subsequently parses standalone.xml, et al was modified to ignore any xml element attributes that are in the "http://www.w3.org/2001/XMLSchema-instance" namespace that contains "schemaLocation".

Most of this was done by simply modifying org.jboss.as.controller.parsing.ParseUtils.requireNoAttributes(XMLStreamReader) to ignore attributes in that namespace (thus not changing its fundamental semantics). Note that I took the liberty of changing XMLExtendedStreamReader arguments to the super-interface XMLStreamReader in ParseUtils where appropriate which is generally considered best practice.

A small number of parsers that could not make use of this method were modified individually.

Before merging this you may want to consider whether or not http://www.jboss.org/**j2ee** is an appropriate physical location for the schema