Hi Stian,

The 'internal' notice is meant to warn users that the class/interface is 
part of the implementation and that they are taking a risk if they use it. 
We've changed other 'stable' looking implementation classes in the past to 
support new function, for performance reasons, to address security issues, 
etc... and need flexibility in order to do so. So while 
org.apache.xerces.impl.dv.SchemaDVFactory and its friends have generally 
been stable we're not guaranteeing that they always will be.

To answer your other question, no there isn't an API in Xerces for 
datatype validation outside of the standard XML schema validation.

Thanks.

Michael Glavassevich
XML Technologies and WAS Development
IBM Toronto Lab
E-mail: mrgla...@ca.ibm.com
E-mail: mrgla...@apache.org

Stian Soiland-Reyes <st...@apache.org> wrote on 02/12/2015 06:08:08 PM:

> Hi,
> 
> Apache Jena uses a feature of Xerces 2 for validating strings that
> claim to be of XSD schema types, by using the
> org.apache.xerces.impl.dv.SchemaDVFactory and friends.
> 
> See for example:
> 
> https://github.com/stain/jena/blob/JENA-878-explicit-impl-imports/
> 
jena-core/src/main/java/com/hp/hpl/jena/datatypes/xsd/XSDDatatype.java#L286
> 
> 
> I believe this is very useful outside XML validation, as XSD datatypes
> are also used in non-XML formats for RDF, like Turtle and JSON-LD.
> 
> 
> The Xerces2-j javadocs however, warn:
> 
> https://xerces.apache.org/xerces2-j/javadocs/xerces2/org/apache/
> xerces/impl/dv/SchemaDVFactory.html
> 
> > INTERNAL:
> > Usage of this class is not supported. It may be altered or removed
> at any time.
> 
> 
> and of course it is under the .impl package, which made OSGi throw
> warnings (and me raising the bug
> https://issues.apache.org/jira/browse/JENA-878 )
> 
> Is there a non-impl way in Xerces2-j to do this datatype validation
> without having to construct a temporary XML document and temporary
> schema?
> 
> 
> Should we really be worried about the org.apache.xerces.impl.dv
> package changing? It seems quite stable and good.. :)
> 
> 
> Would it be possible to suggest it being "upgraded" to non-impl (which
> ironically WOULD break existing calls :-/ ) or at least not to have
> that warning in the doc..?
> 
> 
> 
> -- 
> Stian Soiland-Reyes
> Apache Taverna (incubating)
> http://orcid.org/0000-0001-9842-9718
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscr...@xerces.apache.org
> For additional commands, e-mail: j-users-h...@xerces.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscr...@xerces.apache.org
For additional commands, e-mail: j-users-h...@xerces.apache.org

Reply via email to