Dynamic XSD by "magic URLs"
Questions about XML that are not covered by the other forums should go here.
-
- Posts: 280
- Joined: Thu Nov 28, 2013 9:32 am
- Location: Hamburg/Germany
- Contact:
Dynamic XSD by "magic URLs"
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
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Dynamic XSD by "magic URLs"
Hi Patrik,
So:
So you have a codeblock with a coderef pointing directly to this XML document? And the XML document uses the convert protocol to point to a schema? But the schema is actually a DITA topic which is passed through your custom Java code to create the schema?
So you open the samples.xml document in Oxygen and that is the moment when Oxygen cannot properly convert the relative reference to "topic.dita" to an absolute location.
Would you be willing to give me some precise steps + samples to test this on my side?
If so you can attach the samples and steps to our tech support online form:
https://www.oxygenxml.com/techSupport.html
Regards,
Radu
So:
I cannot guarantee that we can get the relative paths to properly work. Honestly I do not understand the entire thing.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.)
So you have a codeblock with a coderef pointing directly to this XML document? And the XML document uses the convert protocol to point to a schema? But the schema is actually a DITA topic which is passed through your custom Java code to create the schema?
So you open the samples.xml document in Oxygen and that is the moment when Oxygen cannot properly convert the relative reference to "topic.dita" to an absolute location.
Would you be willing to give me some precise steps + samples to test this on my side?
If so you can attach the samples and steps to our tech support online form:
https://www.oxygenxml.com/techSupport.html
You can try to escape that in the URL to its hexadecimal equivalent '%2f'.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?
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “General XML Questions”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service