validating XML against schema with imports
I've been trying to validate the XML document located at
http://flintbox.com/static/api/examples/patents_example.xml
against the schema located at
http://flintbox.com/static/api/flintbox-collection.xsd
in ColdFusion 9 using the code
<cfset results=xmlvalidate(""http://flintbox.com/static/api/examples/patents_example.xml",
"http://flintbox.com/static/api/sample-collection.xsd")>
<cfoutput>
<cfdump var="#results#">
</cfoutput>
When I do so, I observe the following errors:
[Error] :4:41: src-import.3.1: The namespace attribute,
1 'urn:us:gov:uspto:pair', of an <import> element information
item must be identical to the targetNamespace attribute,
'null', of the imported document.
2 [Error] :181:43: src-resolve: Cannot resolve the name
errors 'uspto:Country' to a(n) 'element declaration' component.
[Error] :18:48: cvc-complex-type.2.4.d: Invalid content was
3 found starting with element 'Country'. No child element is
expected at this point.
[Error] :25:48: cvc-complex-type.2.4.d: Invalid content was
4 found starting with element 'Country'. No child element is
expected at this point.
I am able to successfully validate the document against the schema at http://www.xmlforasp.net/SchemaValidator.aspx, however.
In the past, ColdFusion's XML validation mechanism seems to have had issues with schemas that contain imports, e.g., http://forums.adobe.com/message/155906. Have these issues still not been resolved?
