[ https://issues.apache.org/jira/browse/XERCESJ-1703?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16915652#comment-16915652 ]
Christophe Marchand commented on XERCESJ-1703: ---------------------------------------------- I agree that's not a bug, and there are workarounds. But, as a very large majority of projects use artifact repositories to build themselves, Apache Xerces **should** - as many other Apache projects - publish their artifacts to maven central. Apache Xerces is the mostly used XML parser, and it's a pitty it's not available in maven central. Maybe another issue, qualified as 'Evolution' should be created to allow publications to maven central. > Can't get validation examples to work with XSD 1.1 > -------------------------------------------------- > > Key: XERCESJ-1703 > URL: https://issues.apache.org/jira/browse/XERCESJ-1703 > Project: Xerces2-J > Issue Type: Bug > Affects Versions: 2.12.0 > Environment: Windows 10 Enterprise > JDK 1.8.0_121 64-bit > Maven 3.3.9 on Spring Tool Suite 3.9.4.RELEASE > Reporter: Terry Lacy > Priority: Major > > I'm using Maven. I have this dependency: > {code:java} > <dependency> > <groupId>xerces</groupId> > <artifactId>xercesImpl</artifactId> > <version>2.12.0</version> > </dependency>{code} > I've attempted exactly the code shown in XERCESJ-1688 and in the > documentation example here: > [https://xerces.apache.org/xerces2-j/faq-xs.html|https://xerces.apache.org/xerces2-j/faq-xs.html.] > They do not work. When I get to this line: > {code:java} > SchemaFactory.newInstance("http://www.w3.org/XML/XMLSchema/v1.1");{code} > I get the exception: > {code:java} > java.lang.IllegalArgumentException: No SchemaFactory that implements the > schema language specified by: http://www.w3.org/XML/XMLSchema/v1.1 could be > loaded > at > javax.xml.validation.SchemaFactory.newInstance(SchemaFactory.java:215){code} > Is there something missing from the sample code? Does the maven artifact in > maven central not have 1.1 support? > Here's the code I'm currently using: > > {code:java} > private static final String W3C_XML_SCHEMA_11_NS_URI = > "http://www.w3.org/XML/XMLSchema/v1.1"; > // ... > saxParserFactory = SAXParserFactory.newInstance(); > saxParserFactory.setNamespaceAware(true); > // Throws exception here: > schemaFactory = SchemaFactory.newInstance(W3C_XML_SCHEMA_11_NS_URI); > saxParserFactory.setSchema(schemaFactory.newSchema(new File(schemaFile))); > saxParser = saxParserFactory.newSAXParser(); > {code} > > -- This message was sent by Atlassian Jira (v8.3.2#803003) --------------------------------------------------------------------- To unsubscribe, e-mail: j-dev-unsubscr...@xerces.apache.org For additional commands, e-mail: j-dev-h...@xerces.apache.org