Cannot parse XML Document

I am evaluating Oracle XDK 11.2.0.2 for xml parsing and such.  I used to use Saxon version 8, which used to work just fine, so I know this is not an issue with my liquibase scripts, it has to do with the Oracle XDK.

I tried to load a liquibase script, and I got the following error.  Note, I cannot access the XSD from the browser either…

liquibase.exception.ChangeLogParseException: Error parsing line 5 column 84 of C:/development/workspaces/subversion/jira/OIPA-749/INSURANCE.PAS/pas.test/src/test/database/client/VAPolicyClients.changelog.xml: <Line 5, Column 84>: XML-24500: (Error) Can not build schema ‘<a href=‘http://www.liquibase.org/xml/ns/dbchangelog’’ target=’_blank’>http://www.liquibase.org/xml/ns/dbchangelog’ located at ‘<a href=‘http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd’’ target=’_blank’>http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd’
at liquibase.parser.core.xml.XMLChangeLogSAXParser.parse(XMLChangeLogSAXParser.java:93)
at liquibase.Liquibase.update(Liquibase.java:101)

Caused by: oracle.xml.parser.schema.XSDException: invalid facet “pattern” for type “simpleType”
at oracle.xml.parser.v2.XMLError.flushErrorHandler(XMLError.java:425)
at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:287)
at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:331)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:222)
at liquibase.parser.core.xml.XMLChangeLogSAXParser.parse(XMLChangeLogSAXParser.java:85)
… 37 more
Caused by: oracle.xml.parser.schema.XSDException: invalid facet “pattern” for type “simpleType”
at oracle.xml.parser.schema.XSDBuilder.buildSchema(XSDBuilder.java:921)
at oracle.xml.parser.schema.XSDBuilder.build(XSDBuilder.java:558)
at oracle.xml.parser.schema.XSDValidator.processSchemaLocation(XSDValidator.java:1024)
at oracle.xml.parser.schema.XSDValidator.startElement(XSDValidator.java:629)
at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1320)
at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:364)
at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:310)

Thanks Nathan, as always you are SUPER helpful.

I am seeing the parsing issue with Oracle XDK, not Saxon.  Saxon works quite well.

I think it is also due to the XSD being pulled from the internet.  Any idea on how to get it to stop?  Is there a property, or maybe a change in the code that would tell it not to pull the XSD from the internet?

Ahh, even though it looks like the schema is now available from the URL, I am getting the same exception that I posted earlier.

There is logic to keep liquibase from pulling the schema from the internet, but it may not work with saxon.  I’ll have to see why the server is throwing an error, that could be what is causing your problem. 

Nathan

It looks like a problem with what the saxon parser supports for xsd syntax.  Line 5 of the xsd uses a  <xsd:pattern value="${[\w.]+}"/> declaration to make sure that properties follow the correct syntax. 

Is there a newer parser that may support that?

Nathan