Thanks for pointing that out, Alejandro. Not all of it was clear to me so that proves my
point that people should be able to use it without messing with namespaces :-)
feature
http://apache.org/xml/features/validation/dynamic
is not supported in suns JDK 5 Dom parser
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6399139
anonymous wrote : javax.xml.parsers.DocumentBuilderFactory.setFeature(
| "http:// customer .org/xml/features/validation/dynamic", true);
|
| causes the following exception at runtime:
|
| javax.xml.parsers.ParserConfigurationException:
| jaxp_feature_not_supported: Feature
| "http:// customer .org/xml/features/validation/dynamic" is not supported.
|
| ...
|
| This is fixed in JAXP1.4/JDK6
| Posted Date : 2007-04-03 20:23:47.0
|
The only way I got around it was the following:
Use a SAX parser. The JDK 5 sax parser supports that feature. Then I 'borrowed'
a DOMBuilder from ODE that implements ContentHandler and builds up a DOM (in the meantime
it adds the line number information as attributes)
Not sure if this is a practical solution going forward.
I also wondered if it was necessary. Cause I found out that I was in fact NOT using a
validating parser all the time. Our parser that walks the DOM generates most problems
anyway. And people will author the process in an XML editor that still *does* support the
validation.
So the way forward, I think is this:
1) We just use the plain DOM parser when walking the DOM and building the process object
model. This does not do any validation
2) We have a list of deployers that is processing a deployment. So we can offer a
separate validation deployer step that is configurable. If people use this, they will
parse the process 2 times. I don't think that is a big deal.
3) We make the parser that builds up the object model from the DOM configurable. So that
users that are using JDK 6 can activate schema validation in the DOM parse if they want
to.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4160757#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...