Import validation

Ted Hickox <[email protected]> Thu, 14 Dec 2023 09:16:53 -0600
Newsgroups gmane.text.xml.exist
Message-ID <CAAsp6CZyXHm7++s9XS20W3RuW5KPK4MSj_dk1fuhyX__4uz3yw@mail.gmail.com>
I have the following documents:

SVG_Ellipse_Webpage_XQuery_Validator.xq

xquery version "3.0";
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:validate-report($instance,
$schema))

HTML_Student/SVG_Ellipse_Webpage_XML_Schema.xsd

<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:target="
http://www.TedTheSpeedlearner.com <http://www.tedthespeedlearner.com/>"
targetNamespace="http://www.TedTheSpeedlearner.com
<http://www.tedthespeedlearner.com/>" elementFormDefault="qualified">
    <complexType name="HeadType">
        <sequence>
            <element name="head" type="target:TitleType"/>
            <element name="body" type="target:BodyType"/>
        </sequence>
    </complexType>
    <complexType name="TitleType">
        <sequence>
            <element name="title" type="string"/>
            <element name="link" type="target:LinkType"/>
            <element name="script" type="target:ScriptType"/>
        </sequence>
    </complexType>
    <complexType name="LinkType">
        <attribute name="rel" type="string"/>
        <attribute name="type" type="string"/>
        <attribute name="href" type="string"/>
    </complexType>
    <complexType name="ScriptType">
        <attribute name="language" type="string"/>
        <attribute name="src" type="string"/>
    </complexType>
    <complexType name="BodyType">
        <sequence>
            <element name="svg" type="target:SvgType"/>
        </sequence>
        <attribute name="onload" type="string"/>
    </complexType>
    <complexType name="SvgType">
        <sequence>
            <element name="ellipse" type="target:EllipseType"/>
        </sequence>
        <attribute name="id" type="string"/>
    </complexType>
    <complexType name="EllipseType">
        <attribute name="id" type="string"/>
    </complexType>
    <element name="html" type="target:HeadType"/>
</schema>

SVG_Ellipse_Webpage_XML.xml

<html xmlns="http://www.TedTheSpeedlearner.com
<http://www.tedthespeedlearner.com/>" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
http://www.TedTheSpeedlearner.com <http://www.tedthespeedlearner.com/>
 SVG_Ellipse_Webpage_XML_Schema.xsd">
    <head>
        <title>SVG Ellipse</title>
        <link rel="stylesheet" type="text/css" href="
http://localhost:8080/exist/rest/db/apps/HTML_Student/SVG_Ellipse.css"/>
        <script language="javascript" src="
http://localhost:8080/exist/rest/db/apps/HTML_Student/SVG_Ellipse.js"/>
    </head>
    <body onload="Setup()">
        <svg id="Image_Box">
            <ellipse id="My_Ellipse"/>
        </svg>
    </body>
</html>

Michael Westbay stated that I didn't import the validation module
anywhere.  I'm still very new at Xquery.  And I looked up importing
validation on the internet and found no instructions on how to do this in
eXist.  What validation module am I importing and what instruction needs to
be used to perform this importing?

_______________________________________________
Exist-open mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/exist-open