ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> tclxml-users
tclxml-users
[Tclxml-users] FW: TCLDOM validation question
by Jennifer M other posts by this author
Jul 5 2007 5:49PM messages near this date
| Re: [Tclxml-users] Tclxml-users Digest, Vol 2, Issue 4
Hello Steve,

A while ago you had given me this example below (in blue) for using the
validation part of the tcldom. At the time I did not have the 3.1
versions of tcldom and tclxml and due to work constraints I was not able
to update them. But I now have the 3.1 versions but when I do a package
require xml or dom I get back version 3.0.  Is there something wrong
with the packages I am pulling down or are the versions just mislabeled?
But here is the results of the example you provided I am still getting
some errors (in red)

 

set doc [dom::parse $xml] ;# this is the instance XML document

if {[catch {$doc dtd validate} msg]} {

puts stderr "document is not valid due to \"$msg\""

} else {

puts stderr "document is valid"

}

document is not valid due to "unknown method "dtd""

set schemadoc [dom::parse $schemaxml] ;# this is the schema XML document

if {[catch {$schemadoc schema compile} msg]} {

puts stderr "unable to compile schema doc due to \"$msg\""

exit 1

}

unable to compile schema doc due to "unknown method "schema""

 

if {[catch {$schemadoc schema validate $doc} msg]} {

puts stderr "document is not schema-valid due to \"$msg\""

} else {

puts stderr "document is schema-valid"

}

document is not schema-valid due to "unknown method "schema""

I have tried to look up any documentation on this but I was not able to
find much. Could you help me with this? What are the "known methods" for
these function calls?

I have included the files I using. They are just small test files and a
small test script to run it.

Any help is greatly appreciated!!!!
 
Jennifer  
 jmirons@[...].com <blocked::mailto:jmirons@[...].com>  
 

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved