Could you maintain seperate parallel schema db and dynamically eval against the 
right one?


Sent from my iPhone

On Feb 5, 2014, at 3:39 AM, "Anthony Coates" 
<[email protected]<mailto:[email protected]>> wrote:

Classification: Public

Thanks Geert.  FpML is indeed my issue, because FpML only changes namespace URI 
for major versions, but FpML documents contain a version number indicating the 
major & minor version of FpML that the sender was using.  Ideally, the receiver 
should be able to use the same major/minor version Schemas for validation, etc. 
as the sender did, because strategies like using the latest minor version with 
the same major version mean that you have to trust that there are no backwards 
compatibility issues, not even subtle ones, and it's safer for production 
systems if you don't be too trusting.

As a general rule, I always discourage production systems from adding schema 
locations to XML files, because the receiver should decide which Schema(s) to 
use (if any), not the sender, just on security grounds.

I see that you could modifying a temporary copy of an XML file, add any 
necessary schema locations and then validate it, that's an interesting idea.  I 
also liked what others posted around using XSLT to do validation, that seems 
workable.

However, that only helps for validation, it doesn't help you with enabling 
Schema-aware XQueries.

It would be helpful if you could associate a collection of documents with a 
collection of Schemas, rather than only have the current coarser association of 
a database of documents to a database of Schemas.

Cheers, Tony.

____________________________________________________

<ATT00001.gif>

Anthony B. Coates (Tony)
VP | Solution/Data Architect

Deutsche Bank AG, Filiale London
Global Technology and Operations (GTO)
1 Appold Street, EC2A 2UU London, United Kingdom
Tel. +44(20)754-77217
Mobile +44(79)0543-9026
Email [email protected]<mailto:[email protected]>

<ATT00002.gif>



From:   "Geert J." <[email protected]<mailto:[email protected]>>
To:     MarkLogic Developer Discussion 
<[email protected]<mailto:[email protected]>>,
Date:   04/02/2014 21:09
Subject:        Re: [MarkLogic Dev General] schema validation

________________________________



Hi Tony,

You mean that the fpml xsd is using xsd:include to incorporate declarations 
from various files, all for the same targetNamespace, right?

That could indeed cause trouble if you let MarkLogic try to find the top-level 
schema file itself. It will find multiple hits for the same targetNamespace, 
and doesn’t have logic to recognize there is a top-level file among them. You’d 
have to be lucky, if MarkLogic should find the correct one by itself.

But you can point MarkLogic into the right direction. You can for instance use 
schemaLocation to specify a specific xsd file. You can also use schema imports 
to specify a specific file. If you point to the top-level file, I’d expect 
validation to work just fine..

Kind regards,
Geert

Van: 
[email protected]<mailto:[email protected]>
 
[mailto:[email protected]<mailto:[email protected]>]
 Namens Anthony Coates
Verzonden: dinsdag 4 februari 2014 17:14
Aan: MarkLogic Developer Discussion
Onderwerp: Re: [MarkLogic Dev General] schema validation

Classification: Public

The problem, as least for me sometimes, is that MarkLogic assumes you can 
select the Schema(s) based on the namespace URI, and so you are stuck if you 
need to select a specific Schema or set of Schemas where there isn't a 1-to-1 
mapping between Schemas and namespace URIs (as often there isn't, e.g. for 
FpML).

Cheers, Tony.
____________________________________________________

<ATT00003.gif>

Anthony B. Coates (Tony)
VP | Solution/Data Architect

Deutsche Bank AG, Filiale London
Global Technology and Operations (GTO)
1 Appold Street, EC2A 2UU London, United Kingdom
Tel. +44(20)754-77217
Mobile +44(79)0543-9026
Email [email protected]<mailto:[email protected]>

<ATT00004.gif>


From:   "Geert J." <[email protected]<mailto:[email protected]>>
To:     MarkLogic Developer Discussion 
<[email protected]<mailto:[email protected]>>,
Date:   04/02/2014 14:10
Subject:        Re: [MarkLogic Dev General] schema validation



________________________________




Hi Rob,

As far as I know, no. But you can specify a different database as Schemas 
database. It should in principle be possible to select a docs database itself 
as Schemas database..

Kind regards,
Geert

Van: 
[email protected]<mailto:[email protected]>
 
[mailto:[email protected]<mailto:[email protected]>]
 Namens Whitby, Rob
Verzonden: dinsdag 4 februari 2014 13:55
Aan: MarkLogic Developer Discussion
Onderwerp: [MarkLogic Dev General] schema validation

Hi,

I can’t seem to figure out how to use a schema without loading it into the 
schemas db. Is something like this possible?

let $xml := <foo>…
let $schema := <xs:schema>…
let $validate := ???

Thanks
Rob

_______________________________________________
General mailing list
[email protected]<mailto:[email protected]>
http://developer.marklogic.com/mailman/listinfo/general





---

This e-mail may contain confidential and/or privileged information. If you are 
not the intended recipient (or have received this e-mail in error) please 
notify the sender immediately and delete this e-mail. Any unauthorized copying, 
disclosure or distribution of the material in this e-mail is strictly forbidden.

Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional 
EU corporate and regulatory disclosures. 
_______________________________________________
General mailing list
[email protected]<mailto:[email protected]>
http://developer.marklogic.com/mailman/listinfo/general





---

This e-mail may contain confidential and/or privileged information. If you are 
not the intended recipient (or have received this e-mail in error) please 
notify the sender immediately and delete this e-mail. Any unauthorized copying, 
disclosure or distribution of the material in this e-mail is strictly forbidden.

Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional 
EU corporate and regulatory disclosures.
_______________________________________________
General mailing list
[email protected]<mailto:[email protected]>
http://developer.marklogic.com/mailman/listinfo/general

<<inline: ATT00001.gif>>

<<inline: ATT00002.gif>>

<<inline: ATT00003.gif>>

<<inline: ATT00004.gif>>

_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to