Skip to main content
Participating Frequently
April 12, 2007
Question

XmlValidate using a schema with import statements

  • April 12, 2007
  • 6 replies
  • 1163 views
I am running CFMX7.0.2 and I am trying to validate an XML document using XmlValidate against a schema that contains 4 import statements to additional .xsd files.

XmlValidate seems to work fine if I use a simple schema to validate, but when using a schema with import statements, CF seems to choke on those imports.

In CFMX6.1, I was using an MSXML COM object to perform this validation, with no problems, but I was looking forward to not having to use that COM object with CFMX7. The parse works on MX7 if I use the COM object BTW...

We have also installed the lastest hotfixes, and the Sun JVM version 1.4.2_11.

Has anyone else seen this problem, or have any ideas?
This topic has been closed for replies.

6 replies

Participating Frequently
April 14, 2008
Just curious if anyone knows if Adobe updated the Xerces version in 8.0.1?
Inspiring
December 17, 2007
Anybody try updating Xerces themselves?
Participant
December 17, 2007
Can an Adobe team member make a comment on this problem. It has been outstanding since release of CF7! If XMLValidate() is not going to work with imported xsd's in CF7 and CF8 my company will have to find a third party solution.I have wasted a lot of valuable time trying to get this working. A note that this doesnt work should be placed in the ColdFusion 7 and 8 documentation.
Participating Frequently
December 14, 2007
Yes, unfortunately, we are experiencing the same problem with ColdFusion 8 as we saw in 7. The problem is related to the version of Xerces being used by ColdFusion. Adobe did not update the Xerces version between 7 and 8, so the problem persists. We were really hoping for this to be resolved, but so far, no word from Adobe on when or if this will be looked at.
Participant
December 14, 2007
I am having the same problem too can we have some sort of repy about this problem? Validating XML against an xsd is a pretty common function.
Participating Frequently
April 16, 2007
Any ideas? Still having this problem. Does anyone know if this is a known bug or problem with CFMX7?
Participant
October 11, 2007
Hi!

I'm experiencing the same problem with ColdFusion 8.
A minimal example delivering a JRunServlet Error 500 (java.lang.StackOverflowError) with is the following:

index.cfm:

<cfset myResults=XMLValidate("xml.xml","xsd.xsd") />
<cfdump var="#myResults#">

xml.xml:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<artikel>Artikel</artikel>


xsd.xsd:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<xsd:schema xmlns:xsd=" http://www.w3.org/2001/XMLSchema">
<xsd:include schemaLocation=" http://212.91.246.66/ActebisXML/test/xsdinc.xsd"/>
</xsd:schema>


xsdinc.xsd:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<xs:schema xmlns:xs=" http://www.w3.org/2001/XMLSchema">
<xs:element name="artikel" type="xs:string"/>
</xs:schema>

using directly the xsdinc.xds for validation everything is fine:

index.cfm
<cfset myResults=XMLValidate("xml.xml","xsdinc.xsd") />
<cfdump var="#myResults#">

How can i prevent this behavior?

Thank you for any hints!