"<?oxygen RNGSchema" URI on different systems

Hi, I am editing an XML file using the XML Spec document type. So it contains the following PI to associate the RNC schema: <?oxygen RNGSchema="file:/.../frameworks/xmlspec/schema/xmlspec.rnc" type="compact"?> The problem is that I edit it on different systems, and the part shown as "..." does vary between them. Is there any way to make references to editor variables for instance in such URIs? Something like: <?oxygen RNGSchema="${frameworks}/xmlspec/schema/xmlspec.rnc" type="compact"?> I also looked where to configure a URI resolver for oNVDL (because from the error message it seems that it is oNVDL that is used to validate this document) but I didn't find. Is there any particular place I could find interesting in that context (manual section, preferences, config file, webpage?) Thanks, -- Florent Georges http://www.fgeorges.org/

Florent Georges wrote:
The problem is that I edit it on different systems, and the part shown as "..." does vary between them.
And what if... oXygen had support for XML Catalogs and if each framework provided say, such a catalog for all the resources they provide? You know, we could just always use the absolute URIs and do not bother any longer about URI resolution. Would be nice... Sorry? It is implemented yet? Great! :-) Sorry about the noise. Regards, -- Florent Georges http://www.fgeorges.org/

Hi Florent, No problem. Yes, the XML Catalogs are the answer. When you create a new file, from templates and select XML Spec then you get that starting with <?xml version="1.0" encoding="UTF-8"?> <?oxygen RNGSchema="http://www.w3.org/XML/1998/06/schema/xmlspec.rng" type="xml"?> <spec> and the above location is resolved to a local copy by the XML catalog we provide for the XML Spec framework. More important is that any user can create his own frameworks and provide a similar support (as what we do for XML Spec, DocBook, etc.) for other XML vocabularies and these new frameworks can be then shared with other users. One idea further is to provide a space on oxygenxml.com where people can post the frameworks they created that they want to share with the rest of the oXygen users. Imagine a framework for XProc, with document templates, default schema, custom actions to invoke an XProc processor, etc. (another side note here - we need to extend the framework custom action to work not only in Author mode but also in text and grid mode). Best Regards, George -- George Cristian Bina <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com Florent Georges wrote:
Florent Georges wrote:
The problem is that I edit it on different systems, and the part shown as "..." does vary between them.
And what if... oXygen had support for XML Catalogs and if each framework provided say, such a catalog for all the resources they provide? You know, we could just always use the absolute URIs and do not bother any longer about URI resolution.
Would be nice... Sorry? It is implemented yet? Great! :-)
Sorry about the noise. Regards,

George Cristian Bina wrote: George,
Yes, the XML Catalogs are the answer. When you create a new file, from templates and select XML Spec then you get that starting with
<?xml version="1.0" encoding="UTF-8"?> <?oxygen RNGSchema="http://www.w3.org/XML/1998/06/schema/xmlspec.rng" type="xml"?> <spec>
and the above location is resolved to a local copy by the XML catalog we provide for the XML Spec framework.
Yep, I don't know why I didn't think directly about catalogs for that. I'd need more Christmas holidays :-) Unfortunately, it seems that catalogs are not taken into account to resolve stylesheet URIs (xsl:import and xsl:include's href.) And quite weird is that even by setting "Saxon / Advanced / URI Resolver" to org.apache.xml.resolver.tools.CatalogResolver (with the correct JAR in com.oxygenxml.additional.classpath) as well as xml.catalog.files to d:/apps/oxygen-xml-10/frameworks/catalog.xml (or file:///d:/..., it does not work neither,) the stylesheet modules are still resolevd from the absolute location (without using catalogs.) Any idea what's going wrong? Don't you think stylesheet module URIs should be resolved against catalogs used in oXygen?
Imagine a framework for XProc, with document templates, default schema, custom actions to invoke an XProc processor, etc.
I can imagine that, indeed :-) Regards, -- Florent Georges http://www.fgeorges.org/

Hello, The values of xsl:import/@href and xsl:include/@href are URI references and are resolved by uri entries of XML catalogs: uri, rewriteURI, delegateURI. Did you use uri entries or system entries in your XML catalog file? If it does not work with uri entries please send some sample files for reproducing the error. The URI resolver class set in "Saxon / Advanced / URI Resolver / URI Resolver class name (-r)" must implement javax.xml.transform.URIResolver. If you want to set the Apache CatalogResolver as URI resolver you should make sure that your catalog file is accessible from xml.catalog.files which in your case means that Oxygen10/frameworks/catalog.xml includes/delegates to your catalog. The resolver set in "Saxon / Advanced / URI Resolver / URI Resolver class name (-r)" is called before Oxygen's catalog resolver. But I think you should just add your XML catalog containing a uri entry to "Preferences / XML / XML Catalog" because Oxygen already has a catalog resolver which checks all catalogs added to "Preferences / XML / XML Catalog". Regards, Sorin Florent Georges wrote:
Unfortunately, it seems that catalogs are not taken into account to resolve stylesheet URIs (xsl:import and xsl:include's href.) And quite weird is that even by setting "Saxon / Advanced / URI Resolver" to org.apache.xml.resolver.tools.CatalogResolver (with the correct JAR in com.oxygenxml.additional.classpath) as well as xml.catalog.files to d:/apps/oxygen-xml-10/frameworks/catalog.xml (or file:///d:/..., it does not work neither,) the stylesheet modules are still resolevd from the absolute location (without using catalogs.)
Any idea what's going wrong?
Don't you think stylesheet module URIs should be resolved against catalogs used in oXygen?

Sorin Ristache wrote: Sorin,
The values of xsl:import/@href and xsl:include/@href are URI references and are resolved by uri entries of XML catalogs: uri, rewriteURI, delegateURI. Did you use uri entries or system entries in your XML catalog file? If it does not work with uri entries please send some sample files for reproducing the error.
Well, I am writing a DocBook driver stylesheet. So it contains the following import instruction: <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl"/> The catalog in the DocBook framework contains the following entry: <rewriteURI uriStartString="http://docbook.sourceforge.net/release/xsl/current/" rewritePrefix="xsl/"/> So if I am right that's correct, isn't it?
The URI resolver class set in "Saxon / Advanced / URI Resolver / URI Resolver class name (-r)" must implement javax.xml.transform.URIResolver.
Yep. Apache's CatalogResolver does.
If you want to set the Apache CatalogResolver as URI resolver you should make sure that your catalog file is accessible from xml.catalog.files which in your case means that Oxygen10/frameworks/catalog.xml includes/delegates to your catalog.
Yep, that's the case.
The resolver set in "Saxon / Advanced / URI Resolver / URI Resolver class name (-r)" is called before Oxygen's catalog resolver.
But I think you should just add your XML catalog containing a uri entry to "Preferences / XML / XML Catalog" because Oxygen already has a catalog resolver which checks all catalogs added to "Preferences / XML / XML Catalog".
Mmh, I stopped oXygen and restarted it. And now it does use the catalogs to resolve the stylesheet URI. Maybe I've just hit a corner case somewhere... Thanks for the answer, and sorry for the noise (again.) Regards, -- Florent Georges http://www.fgeorges.org/

If you add a catalog file to Preferences / XML / XML Catalog or you change a catalog file referenced from a file added there you have to reopen the transformed XML or XSLT file in Oxygen if it is already opened or you have to restart Oxygen. But in your case I understand that you tried to use the rewriteURI mapping from frameworks/docbook/catalog.xml which should work out of the box as it is one of the Oxygen default catalogs. If you can reproduce the error again please let us know. Thank you, Sorin Florent Georges wrote:
<xsl:import
href="http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl"/>
The catalog in the DocBook framework contains the following entry:
<rewriteURI
uriStartString="http://docbook.sourceforge.net/release/xsl/current/" rewritePrefix="xsl/"/>
So if I am right that's correct, isn't it?
Mmh, I stopped oXygen and restarted it. And now it does use the catalogs to resolve the stylesheet URI. Maybe I've just hit a corner case somewhere...

Sorin Ristache wrote:
If you can reproduce the error again please let us know.
I've tried to reproduce the problem based on what steps I remembered, but didn't succeed. Sorry. (well, maybe that's just a wrong diagnostic on my side, I am not sure at 100%) Regards, -- Florent Georges http://www.fgeorges.org/
participants (3)
-
Florent Georges
-
George Cristian Bina
-
Sorin Ristache