[oXygen-user] Multi-schema validation with namespace-implicit and xml-model-specific schema references

Oxygen XML Editor Support (Adrian Buza) support at oxygenxml.com
Mon Sep 12 05:06:03 CDT 2016


Hi,

>> BTW, the option  "Process namespaces through URI mappings for XML 
>> Schema" does no affect XML instances, only XML schemas.
> I'm not sure what you mean by this. Enabling implicit association 
> causes an instance document to have implicit validation and 
> schema-driven editing to occur (my desired outcome for instance 
> documents in "well-known" namespaces — I deliberately avoid 
> xsi:schemaLocation in order to exploit this feature and to avoid 
> stale|incorrect|unreliable references to local and non-local resources).
The implicit association by namespace is always enabled for XML 
instances and cannot be disabled.
So, the option we are discussing has nothing to do with the implicit 
association from XML instances, it affects only imports (xs:import) from 
XML Schemas:
e.g.
<xs:import namespace="http://my.namespace"/>

*Process namespaces through URI mappings for XML Schema***
> If selected, the target namespace of the *imported XML Schemas *is 
> resolved through the /uri/ mappings. The namespace is taken into 
> account only when the schema specified in the /schemaLocation/ 
> attribute was not resolved successfully. 
Note that it's not xsi:schemaLocation that is mentioned there, but 
xs:import/@schemaLocation.

Anyway, my point is you don't need that option, at least not for the 
implicit association by namespace.

Regards,
Adrian

On 12.09.2016 12:22, Gary Gapinski wrote:
> Hello, Adrian:
>
> Thanks for the confirmation.
>
> The workaround suffices.
>
> Were a variant technique to be considered, and implicit association 
> were "sticky", then explicit associations would be additive. However, 
> such augmentation might still allow dueling (XML Schema) schemata if 
> additional ones were explicitly cited. I am not familiar with XML 
> Schema precedence rules (if such exist).
>
>> BTW, the option  "Process namespaces through URI mappings for XML 
>> Schema" does no affect XML instances, only XML schemas.
>
> I'm not sure what you mean by this. Enabling implicit association 
> causes an instance document to have implicit validation and 
> schema-driven editing to occur (my desired outcome for instance 
> documents in "well-known" namespaces — I deliberately avoid 
> xsi:schemaLocation in order to exploit this feature and to avoid 
> stale|incorrect|unreliable references to local and non-local resources).
>
> Regards,
>
> Gary
>
>
> On 09/12/2016 02:57 AM, Oxygen XML Editor Support (Adrian Buza) wrote:
>> Hi Gary,
>>
>> Oxygen treats the schema determined from the namespace of the root 
>> element (namespace resolved through the XML catalogs as an URI) as a 
>> fallback schema association (implicit), if no explicit schema 
>> associations are present.
>> An xml-model PI is explicit and thus overrides this fallback schema 
>> association. It's impossible to tell if the xml-model PIs complement 
>> or override the implicit schema (just from the PI declaration), so it 
>> was decided to always override it.
>>
>> I see you have already found the workaround, it may seem superfluous, 
>> but right now if you make one explicit association, you also need to 
>> specify the one that was implicit.
>> I've submitted a request on our issue tracking tool to discuss if/how 
>> we should allow the implicit association to stick.
>>
>>
>> BTW, the option  "Process namespaces through URI mappings for XML 
>> Schema" does no affect XML instances, only XML schemas.
>>
>> Regards,
>> Adrian
>> Adrian Buza
>> oXygen XML Editor and Author Support
>>
>> Tel: +1-650-352-1250 ext.2020
>> Fax: +40-251-461482
>>
>> On 08.09.2016 21:39, Gary Gapinski wrote:
>>>
>>> Hello:
>>>
>>> I have found that a document that used namespace-implicit XML 
>>> Catalog driven XML Schema validation (via the "Process namespaces 
>>> through URI mappings for XML Schema" in XML Catalog preferences) 
>>> works as expected until an xml-model 
>>> <https://www.w3.org/TR/xml-model/> processing instruction for an 
>>> additional (Schematron) schema is added to the document. After the 
>>> addition, the XML Schema based on the document's namespace is no 
>>> longer applied. Removing the xml-model PI restores the implicit XML 
>>> Schema validation.
>>>
>>> This can be avoided by adding a (seemingly superfluous) additional 
>>> xml-model PI for the XML Schema citing the document's namespace in 
>>> its href pseudo-attribute.
>>>
>>> Is this the expected behavior? I had expected the namespace URI 
>>> mapping to implicitly associate the XML schema and the xml-model PI 
>>> to explicitly augment this.
>>>
>>> Regards,
>>>
>>> Gary
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> oXygen-user mailing list
>>> oXygen-user at oxygenxml.com
>>> https://www.oxygenxml.com/mailman/listinfo/oxygen-user
>
>
>
>
> _______________________________________________
> oXygen-user mailing list
> oXygen-user at oxygenxml.com
> https://www.oxygenxml.com/mailman/listinfo/oxygen-user

-- 
Adrian Buza
oXygen XML Editor and Author Support

Tel: +1-650-352-1250 ext.2020
Fax: +40-251-461482

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.oxygenxml.com/pipermail/oxygen-user/attachments/20160912/11c053f2/attachment.html>


More information about the oXygen-user mailing list