You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by "Brian McDonald (JIRA)" <ji...@apache.org> on 2010/09/06 02:25:32 UTC
[jira] Updated: (WSCOMMONS-520) Add a setEntityResolver() to be
used in XmlSchemaCollection.read
[ https://issues.apache.org/jira/browse/WSCOMMONS-520?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brian McDonald updated WSCOMMONS-520:
-------------------------------------
Attachment: WSCOMMONS-520.patch
> Add a setEntityResolver() to be used in XmlSchemaCollection.read
> ----------------------------------------------------------------
>
> Key: WSCOMMONS-520
> URL: https://issues.apache.org/jira/browse/WSCOMMONS-520
> Project: WS-Commons
> Issue Type: Improvement
> Components: XmlSchema
> Affects Versions: XmlSchema 1.4.4
> Reporter: Brian McDonald
> Attachments: WSCOMMONS-520.patch
>
> Original Estimate: 0.5h
> Remaining Estimate: 0.5h
>
> XmlSchema read(final InputSource inputSource, ValidationEventHandler veh,
> TargetNamespaceValidator namespaceValidator) {
> try {
> DocumentBuilderFactory docFac = DocumentBuilderFactory.newInstance();
> docFac.setNamespaceAware(true);
> final DocumentBuilder builder = docFac.newDocumentBuilder();
> /* specify ER on doc builder */
> if (entityResolver != null) builder.setEntityResolver(entityResolver);
> Document doc = null;
> doc = parse_doPriv(inputSource, builder, doc);
> return read(doc, inputSource.getSystemId(), veh, namespaceValidator);
> } catch (ParserConfigurationException e) {
> throw new XmlSchemaException(e.getMessage());
> } catch (IOException e) {
> throw new XmlSchemaException(e.getMessage());
> } catch (SAXException e) {
> throw new XmlSchemaException(e.getMessage());
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.