Can I please get any help on the below issue?
From: [email protected]
[mailto:[email protected]] On Behalf Of Karunanithi,
Bharathi
Sent: Tuesday, May 23, 2017 5:20 PM
To: MarkLogic Developer Discussion
Subject: [MarkLogic Dev General] Schema validation fails for certain XMLs
Hi Team,
I am getting the following validation error in MarkLogic 8.0-6.4 hosted on a
AWS EC2 instance. But certain xml files fails the validation against the Schema
particularly in this environment alone.
Same XML passes the validation in other ML environments and also from other
standalone validation tools using Schemas.
The used Schema files are attached in Zip format. Major Schema file being
pam.xsd from the zip.
Sample XML for which the error is occurring and the error are also attached
with this email.
Error: Please note that this error only occurs for a xml with a line break
tags(<br/> or <br></br>). XML files without any line breaks are passing the
Schema Validation.
XDMP-VALIDATEUNEXPECTED: (err:XQDY0027) validate lax { $n } -- Invalid node:
Found @clear but expected (@title? & @class? & @id?) at
fn:doc("//swcnpny048/2017/Print/Lucky/20170306/XML/GW201703_11_11.xml")/pam:message/pam:article/pam-xhtml:body/pam-xhtml:h1/pam-xhtml:br/@clear
using schema "pam.xsd"
Script:
import module namespace validate =
"http://condenast.com/dam/2.0/lib/validation" at
"/application/lib/validation-lib.xqy";
import module namespace mapping = "http://condenast.com/dam/2.0/lib/mapping" at
"/application/lib/mapping-lib.xqy";
import module namespace util =
"http://condenast.com/dam/2.0/lib/validation-utils" at
"/application/lib/validation-utils.xqy";
declare namespace cndam = "http://condenast.com/dam/2.0";
let $path:= "//swcnpny048/2017/Print/Lucky/20170306/XML/GW201703_11_11.xml"
let $assetType:= mapping:get-asset-type-by-extension($path)
let $content := xdmp:document-get($path)
let $schema := validate:get-schema-from-asset-type($assetType)
let $results := util:validate-with-schema(
$content,
$schema/cndam:namespace/text(),
$schema/cndam:schemaLocation/text()
)
return $results
Please tell me if I am missing any configurations? Or any?
Thanks,
Bharathi K
_______________________________________________
General mailing list
[email protected]
Manage your subscription at:
http://developer.marklogic.com/mailman/listinfo/general