|
|
 |
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>
|
|
|
 |
|