[MarkLogic Dev General] Validating XML against Schema
G.V., Jibin
JGVijayan at INNODATA-ISOGEN.COM
Wed Sep 15 23:51:43 PDT 2010
HI,
There was a problem in the xml document and I have rectified it.
But now I am getting the below error:
[1.0-ml] XDMP-VALIDATENODECL: (err:XQDY0084) validate strict { $node } -- Missing element declaration: Expected declaration for node doc("/referenceData/01C3122F-E791-40A5-B52E-963CB6685F71.xml")/document in non-lax mode using schema ""
Regards,
Jibin G V
Innodata Isogen Technologies
________________________________
From: G.V., Jibin
Sent: Wednesday, September 15, 2010 8:56 PM
To: 'general at developer.marklogic.com'
Subject: Validating XML against Schema
Hi,
I am trying to validate an xml document against a schema in the schemas database.
Schema is in root of the schema database.
Schema root element:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="urn:hl7-org:v3"
xmlns:mif="urn:hl7-org:v3/mif"
targetNamespace="urn:hl7-org:v3"
elementFormDefault="qualified">
Source Xml is in another database.
Source xml root element :
<document xmlns:voc="http://www.hl7.org/v3/voc" xmlns="urn:hl7-org:v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:hl7-org:v3 http://www.fda.gov/oc/datacouncil/schemas/spl/spl.xsd">
I am trying to validate xml document with the below code.
xquery version "1.0-ml";
import schema "urn:hl7-org:v3" at "/spl.xsd";
declare default element namespace "urn:hl7-org:v3";
let $node := fn:doc("/referenceData/01C3122F-E791-40A5-B52E-963CB6685F71.xml")
return validate strict{ $node }
I am getting the below error:
XDMP-VALIDATEBADARG: (err:XQTY0030) validate strict { $node } -- Argument to validate expression must be document or element node.
Can anyone suggest a possible solution?
Regards,
Jibin G V
Innodata Isogen Technologies
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://developer.marklogic.com/pipermail/general/attachments/20100916/01936749/attachment.html
More information about the General
mailing list