Forwarded message 1
Henry,
Call me an idiot but.....
I have been trying to get your XSV running on my local machine.
I downloaded the stuff as suggested.
First glitch - when the validator sees:
<xsd:schema
xmlns:xsd="http://www.w3.org/1999/XMLSchema"
>
it goes looking for the www.w3.org site and does not work. I want
this to run on a laptop when offline.
Next - I downloaded various stuff from http://www.w3.org/1999/XMLSchema
and changed my .xsd document to:
<xsd:schema
xmlns:xsd="XMLSchema.xml"
>
and got the following:
Traceback (most recent call last):
File "applyschema.py", line 747, in ?
runitAndShow(argl[0],argl[1:],k,style)
File "applyschema.py", line 438, in runitAndShow
(res,encoding)=runit(en,rns,k)
File "applyschema.py", line 588, in runit
validate(e, t, s, ed)
File "applyschema.py", line 47, in validate
validateElement(element, typedef, schema, eltDecl)
File "applyschema.py", line 123, in validateElement
validateKeys(eltDecl,element)
File "applyschema.py", line 325, in validateKeys
validateKeys1(elt,decl.keys,1)
File "applyschema.py", line 333, in validateKeys1
candidates=sp.find(elt)
File "xpath.py", line 39, in find
sub=self.process(element,pat)
File "xpath.py", line 61, in process
res=pe(element)
File "xpath.py", line 34, in <lambda>
return lambda e,y=None,s=self,n=part:s.children(e,n,y)
File "xpath.py", line 103, in children
for c in element.children:
AttributeError: 'Element' instance has no attribute 'children'
For the life of me - I can't work out what it is trying to do
and failing. Any help would be appreciated.
Also - while I've got your attention - I am working with key and keyref.
Can you use these with a complexType rather than an element. eg:
<xsd:complexType blah>
<xsd:element ID type="ID"/>
</xsd:complexType>
<xsd:key>
<xsd:selector>blah</xsd:selector>
<xsd:field>@ID</xsd:field>
</xsd:key>
THanks in advance.
...cmb
--
Craig Brown Principal Software Engineer
Canon Information Systems Research Australia Phone: 61 2 9805 2469
1 Thomas Holt Drive, North Ryde, NSW 2113. Fax: 61 2 9805 2929