Re: Still trying to validate an XML Schema
Ted Hickox <[email protected]> Sun, 9 Jun 2024 14:41:39 -0500
| Newsgroups | gmane.text.xml.exist |
|---|---|
| Message-ID | <CAAsp6CaRrM_DVnsurSsK_tQqc4b-6tY22vR64nRm_wr2DVy9Vw@mail.gmail.com> |
I have a small update. I made a couple of changes to my code:
xquery version "3.0";
import module namespace validation="http://exist-db.org/xquery/validation";
let $schema :=
xs:anyURI('/db/apps/HTML_Student/SVG_Ellipse_Webpage_XML_Schema.xsd')
let $instance :=
xs:anyURI('/db/apps/HTML_Student/SVG_Ellipse_Webpage_XML.xml')
return
(validation:clear-grammar-cache())
(validation:jaxp-report($instance, $schema))
This fixed a bunch of problems. But when I ran the code, I got this
information:
[image: image.png]
I still don't know what error I made.
eption>
<path>/db/apps/HTML_Student/SVG_Ellipse_Webpage_XQuery_Validator.xq</path>
<message>err:XPTY0004 Type error: expected function, got xs:integer [at
line 6, column 2, source:
/db/apps/HTML_Student/SVG_Ellipse_Webpage_XQuery_Validator.xq]</message>
</exception>
exception>exception>
<path>/db/apps/HTML_Student/SVG_Ellipse_Webpage_XQuery_Validator.xq</path>
<message>err:XPTY0004 Type error: expected function, got xs:integer [at
line 6, column 2, source:
/db/apps/HTML_Student/SVG_Ellipse_Webpage_XQuery_Validator.xq]</message>
</exception>
<path>/db/apps/HTML_Student/SVG_Ellipse_Webpage_XQuery_Validator.xq</path>
<message>err:XPTY0004 Type error: expected function, got xs:integer [at
line 6, column 2, source:
/db/apps/HTML_Student/SVG_Ellipse_Webpage_XQuery_Validator.xq]</message>
</exception>
On Sun, Jun 9, 2024 at 1:58 PM Ted Hickox <[email protected]> wrote:
> A few months ago I was informed that the function
> validation:validate-report had been depreciated and is no longer available
> in the eXist database. So someone suggested I use the validate:jaxp-report
> function. Shortly after I received this suggestion, I tried to use it.
> But it failed. Unfortunately my life became very busy and I had to abandon
> my project. Now that my life is a little calmer, I tried to play with this
> computer code again. And still something is not functioning correctly.
> I'm still not sure what I'm doing wrong.
>
> xquery version "3.0";
> import module namespace validation="http://exist-db.org/xquery/validation
> ";
> let $schema :=
> xs:anyURI('/db/apps/HTML_Student/SVG_Ellipse_Webpage_XML_Schema.xsd')
> let $instance :=
> xs:anyURI('/db/apps/HTML_Student/SVG_Ellipse_Webpage_XML.xml')
> return
> (validation:clear-grammar-cache(); validation:jaxp-report($instance as
> item(), $enable-grammar-cache as xs:boolean, $catalogs as item()*) as
> node())
>
_______________________________________________
Exist-open mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/exist-open
image.png
(image/png, 61.5 KB) - not displayed