You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Model model = ModelFactory.createDefaultModel();
StreamProcessor streamProcessor = new StreamProcessor(RdfaParser.connect(JenaSink.connect(model)));
nu.validator.htmlparser.sax.HtmlParser reader = new nu.validator.htmlparser.sax.HtmlParser(XmlViolationPolicy.ALTER_INFOSET);
streamProcessor.setProperty(StreamProcessor.XML_READER_PROPERTY, reader);
streamProcessor.process(htmlPage.openStream(), htmlPage.toString());
return model;
Note how the prefix "eli" is not resolved. Are the prefix declarations using xmlns supported ? setting .setProperty(RdfaParser.RDFA_VERSION_PROPERTY, RDFa.VERSION_10) doesn't change.
Is there anything I could do in the code to parse the above HTML without changing it ? if no, does anyone sees which modifications need to be done in the XHTML above ?
Thanks a lot !
The text was updated successfully, but these errors were encountered:
Actually, I think the problem is in nu.validator.htmlparser.sax.HtmlParser that does not pass in the SAX events corresponding to the xmlns: declarations. The situation is a bit confuse because HTML, strictly speaking and as far as I can see, does not allow xmlns declarations, other than the html namespace. So I don't know what should happen if an alternate DTD is declared like in this case.
hello,
I am getting an error at: "JenaSink.connect(model)" point. Error says: "The method connect(com.hp.hpl.jena.rdf.model.Model) in the type JenaSink is not applicable for the arguments (org.apache.jena.rdf.model.Model)"
Please help me with the problem.
Parsed with the following code :
Returns :
Note how the prefix "eli" is not resolved. Are the prefix declarations using xmlns supported ? setting
.setProperty(RdfaParser.RDFA_VERSION_PROPERTY, RDFa.VERSION_10)
doesn't change.Is there anything I could do in the code to parse the above HTML without changing it ? if no, does anyone sees which modifications need to be done in the XHTML above ?
Thanks a lot !
The text was updated successfully, but these errors were encountered: