Re: validating xml with schema and libxml - expression could not be compiled
by Petr Pajas other posts by this author
Jul 14 2006 4:01AM messages near this date
view in the new Beta List Site
validating xml with schema and libxml - expression could not be compiled
|
Re: validating xml with schema and libxml - expression could not be compiled
& XSLT Hi,
Check if xmllint validates your document. If not and you are sure your schema
is correct, then the problem probably lies in libxml2 and you should report
there (see http://xmlsoft.org/bugs.html).
-- Petr
On Thursday 13 July 2006 14:52, Martin J. Evans wrote:
> Hi,
>
> I am attempting to validate an XML file with a schema using XML::LibXML.
>
> A portion of the XML looks like this:
>
> <event name="name" type="type" timestamp="2006-05-19T17:25:00">
> <entrants>
> <entrant external_id="1" status_id="1">fred</entrant>
> <entrant external_id="2" status_id="1">fred2</entrant>
> <entrant external_id="3" status_id="1">fred3</entrant>
> <entrant external_id="4" status_id="1">fred4</entrant>
> <entrant external_id="5" status_id="1">fred5</entrant>
> </entrants>
> </event>
>
> and all the entrant element text should be unique so the xsd says:
>
> <xs:key name="entrantcontent">
> <xs:selector xpath="./entrants/entrant"/>
> <xs:field xpath="text()"/>
> </xs:key>
>
> but I cannot get XML::LibXML to accept the field xpath expression as it
> always reports:
>
> Element '{http://www.w3.org/2001/XMLSchema}field', attribute 'xpath': The
> XPath expression 'text()' could not be compiled.
>
> As each entrant has attributes and content I only wanted to pick the
> content as having to be unique. Is my xpath expression wrong or perhaps
> text() is not supported?
>
> Martin
> --
> Martin J. Evans
> Easysoft Ltd, UK
> http://www.easysoft.com
>
> _______________________________________________
> Perl-XML mailing list
> Perl-XML@[...].com
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
Perl-XML mailing list
Perl-XML@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Martin J. Evans
Petr Pajas
Martin J. Evans
|