Hello,
My
problem is that I can´t acess both PSVI and the
node´s value in the same parse.
In this code bellow,
I can acess the node information but I could only acess top-level PSVI
with the
XSModel returned.
XMLParserConfiguration
config = new
StandardParserConfiguration();
config.setProperty("http://apache.org/xml/properties/internal/grammar-pool",grammarPool);
DOMParser parser = new DOMParser(config);
parser.setFeature("http://xml.org/sax/features/validation",true);
parser.setFeature("http://apache.org/xml/features/validation/schema",true);
parser.parse(filename);
doc = parser.getDocument();
org.apache.xerces.impl.xs.psvi.XSModel model =
grammarPool.toXSModel();
In
this one, I can acess the PSVI but not the node’s value
:
DOMParser
parser = new DOMParser();
parser.setFeature("http://xml.org/sax/features/validation",true);
parser.setFeature("http://apache.org/xml/features/validation/schema",true);
parser.setProperty("http://apache.org/xml/properties/dom/document-class-name","org.apache.xerces.dom.PSVIDocumentImpl");
parser.parse(filename);
doc
= parser.getDocument();
//
only to test
ElementPSVI elem = (ElementPSVI) node;
System.out.println(node.getNodeName()
+ " : "+node.getNodeValue()); // the output is always : “ node name :
null”;
I could
parse the
document twice, using the normal way and the PSVI, but it would take
more time
and resources…
Sorry to
keep bothering
you but I´ve read all the FAQ and went trought the docs but I still
haven´t found
a way to solve this.
Thank´s
Rubens