If you are savy with java, you might be able to make use of the SUN multi-schema 
validator.  Here's the skinny:

"The Sun[tm] Multi-Schema XML Validator (MSV) is a Java[tm] technology tool to 
validate XML documents against several
kinds of XML schemata. It supports RELAX NG, RELAX Namespace, RELAX Core, TREX, XML 
DTDs, and a subset of XML Schema
Part 1. This latest (version 1.12) release adds better conformance to RELAX NG/W3C XML 
standards and JAXP masquerading.
This download package includes binaries, source code, and detailed documentation."

http://www.sun.com/software/xml/developers/multischema/

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Dick Applebaum
Sent: Saturday, December 15, 2001 8:50 AM
To: [EMAIL PROTECTED]
Subject: [cf-xml] Schema Validation Examples


I didn't get a response to my post to this list, so I cross-posted to
the CFTalk list.  Nick de Voil provided a reference that was useful.

Here is what I have found so far:


Thanks Nick1

>From your reference, and a few others I found, I was able to cobble
together a simple CF program that actually works!

   <cfscript>
     schemaCache = CreateObject("COM","MSXML2.XMLSchemaCache.4.0");
     schemaCache.Add("","c:\test\listschema.xml");
     doc = CreateObject("COM","MSXML2.DOMDocument.4.0");
     doc.schemas = schemaCache;
     doc.async = 0;
     doc.load("c:\tesr\publist_schema.xml");
     XMLParsingError = doc.parseError;
   </cfscript>

   <cfoutput>
   <br>ErrorCode.....|#XMLParsingError.ErrorCode#|
   <br>Reason........|#XMLParsingError.Reason#|
   </cfoutput>


I am really "shooting in the dark" though:

   VBS 5 does not support "Dim ... As" to create an object

   The Object ClassName "MSXML2.XMLSchemaCache40" in VB, needs to be
specified as
   "MSXML2.XMLSchemaCache.4.0" in cfobject

   The Object ClassName "MSXML2.DOMDocument40" in VB, needs to be specified as
   "MSXML2.DOMDocument.4.0" in cfobject

So far, I have only been able to validate by loading the XNL document
from disk.

I would like to do much more, but have been unable to find any info
on the MSXML 4.0 objects, methods and properties.

Any help will be greatly appreciated!

Dick

At 4:45 AM -0500 12/15/01, Nick de Voil wrote:
>Dick
>
>Does this help?
>
>http://www.vbws.com/tutors/xsd/xsdvb.aspx
>
>The nitty-gritty part seems to be
>
>Dim schemaCache As MSXML2.XMLSchemaCache40
>Set schemaCache = New MSXML2.XMLSchemaCache40
>schemaCache.Add ��,�D:\schemas\mySchema.xsd�
>Dim doc As MSXML2.DOMDocument40
>Set doc = New MSXML2.DOMDocument40
>Set doc.schemas = schemaCache
>doc.async = False
>If Not doc.Load(�D:\docs\myDoc.xml�) Then
>         MsgBox "Error loading XML document: " & doc.parseError.reason
>End If
>
>which CFOBJECT could handle I dare say.
>
>Nick


-----------------------+
cf-xml mailing list
list: [EMAIL PROTECTED]
admin: [EMAIL PROTECTED]
home: http://torchbox.com/xml


-----------------------+
cf-xml mailing list
list: [EMAIL PROTECTED]
admin: [EMAIL PROTECTED]
home: http://torchbox.com/xml

Reply via email to