Well spotted: That is exactly what's happening. XMLSpy has a catalog
engine underneath, when your xml file has something like
.... xsi:schemaLocation("foo://bar.baz/ myFoo.xsd") ...
the myFoo.xsd is ignored when foo://bar.baz/ appears in the catalog. Since
the XHTML schemas are in the catalog, you have to unset them and restart
Spy to reload the catalog into memory. If I can remember how to do that,
I'll post the steps here.
In the short term, I changed the 1999/xhtml to 1999_0/xhtml (5 times) to
bypass the catalog, and:
Element <div> is not allowed under element <p>.
Reason: The following elements are expected at this location (see below)
...
Error location: html / body / div / p / div
Details
cvc-complex-type.1.4: Element <div> unexpected by type
'phrasingContentElement' of element <p>.
cvc-type.3.2: Element <p> is not valid with respect to type
definition 'phrasingContentElement'.
cvc-elt.5.2.1: The element <p> is not valid with respect to the
actual type definition 'phrasingContentElement'.
Regards,
rip
On Wed, Apr 8, 2015 at 8:55 AM, Vanhoutte Michiel <
[email protected]> wrote:
> Hello Richard,
>
>
>
> It has to be indeed:
>
> import schema "http://www.w3.org/1999/xhtml" at "xhtml5-ml-wkb.xsd" ;
> (not xhtml5-ml-wkb_group_resolved.xsd).
>
>
>
> But the problem remains the same.
>
>
>
> I had the same error in XMLSpy but I guess that’s because the default
> namespace used is ‘http://www.w3.org/1999/xhtml’ and Spy has also a
> Schema for this namespace and using this.
>
>
>
> Kind Regards,
>
> Michiel
>
>
>
> *From:* [email protected] [mailto:
> [email protected]] *On Behalf Of *Richard Williamson
> *Sent:* woensdag 8 april 2015 14:45
> *To:* MarkLogic Developer Discussion
> *Subject:* Re: [MarkLogic Dev General] no schema validation error in
> MarkLogic but in 'Eclipse' and 'XMLStarlet'
>
>
>
> Hi Michiel,
>
> XMLSpy isn't happy with the html element --
>
> Element <html> has no declaration for an attribute named 'vocab'.
> Error location: html / @vocab
> Details
> VC: Attribute Value Type: Element <html> has no declaration for an
> attribute named 'vocab'.
>
> Did you supply the correct xsd? I note that your XQuery syntax states
> "...wkb_group_resolved.xsd" but the file you supplied is only
> "...wkb.xsd".
>
> Regards,
>
> rip
>
>
>
> On Wed, Apr 8, 2015 at 8:19 AM, Vanhoutte Michiel <
> [email protected]> wrote:
>
> Hi,
>
>
>
> In attachment the following documents:
>
> mnrs6108899.xml
>
> xhtml5-ml-wkb.xsd
>
> semantics.xsd
>
>
>
> If I validate this document ‘mnrs6108899.xml’ outside MarkLogic with
> ‘Eclipse’ or ‘XMLStarlet’, I get correctly an error message that on line
> 943 a ‘div’ element is not allowed in a ‘p’ element according to the schema.
>
>
>
> If I do this validation in MarkLogic using the construct:
>
>
> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>
> xquery version "1.0-ml";
>
> declare namespace html = "http://www.w3.org/1999/xhtml";
>
>
>
> import schema "http://www.w3.org/1999/xhtml" at
> "xhtml5-ml-wkb_group_resolved.xsd" ;
>
> import schema "http://marklogic.com/semantics" at "semantics.xsd" ;
>
>
>
> xdmp:validate(
>
> doc('mnrs6108899.xml')
>
> , 'strict' )
>
>
> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>
>
>
> I get no validation errors:
>
>
>
> <xdmp:validation-errors xmlns:xdmp="http://marklogic.com/xdmp">
>
> </xdmp:validation-errors>
>
>
>
> Does this mean MarkLogic does not fully support XML schema validation?
>
>
>
>
>
> I’m sure that the document instance and schemas are loaded correctly
> because:
>
> - if I change the ‘body’ element to ‘bodyX’ both in the schema
> and the instance => I get no error as expected
>
> - if I only change the ‘body’ element to ‘bodyX’ in the schema
> or the instance => I get an error as expected
>
>
>
>
>
> Kind regards,
>
> Michiel
>
>
>
> ------------------------------
>
> Michiel Vanhoutte
>
> Wolters Kluwer Belgium
>
>
> _______________________________________________
> General mailing list
> [email protected]
> Manage your subscription at:
> http://developer.marklogic.com/mailman/listinfo/general
>
>
>
> _______________________________________________
> General mailing list
> [email protected]
> Manage your subscription at:
> http://developer.marklogic.com/mailman/listinfo/general
>
>
_______________________________________________
General mailing list
[email protected]
Manage your subscription at:
http://developer.marklogic.com/mailman/listinfo/general