Dynamic XSD by "magic URLs"
Posted: Mon May 29, 2017 9:09 am
Hi,
in our DITA documents we have plenty of xml samples. Thus, we need good support for creating and validating them.
My idea is now to import them from a seperate xml file (customization of codeblock + coderef) having a dynamically created schema assigned to it:
The first experiments look already very promising: validation anf content completion is working fine.
But currently I have these two issues:
Thanks and regards,
Patrik
in our DITA documents we have plenty of xml samples. Thus, we need good support for creating and validating them.
My idea is now to import them from a seperate xml file (customization of codeblock + coderef) having a dynamically created schema assigned to it:
Code: Select all
<samples xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="convert:/processor=java;jars=DitaSemiaOxygen.jar;ccn=org.DitaSemia.Oxygen.AdvancedKeyRef.DynamicXsd;root=Message/VU_GDV_001!/test-topic.dita">
<sample id="1">
[...]
</sample>
<sample id="2">
[...]
</sample>
</samples>
But currently I have these two issues:
- The target URL (here: "test-topic.dita") is being resolved relative to the oxygen installation folder - not relative to my samples.xml file. (With an urn it works, but this is very unappropriate for my use-case.)
- The custom properties I need to pass might contains a "/" (in the sample: "root=Message/VU_GDV_001"). Is there any way to escape these characters to avoid the property value to be cut there?
Thanks and regards,
Patrik