From: Len S. <le...@wi...> - 2022-04-01 19:05:59
|
We are close. If I rewrite the XSL to: <xsl:variable name=“file" select="doc('oxygen:/eXist-db%20localhost$eXist-db%20localhost/db/file.xml')"/> Then it does successfully load the file. But the catalog step still results in an error, as it doesn’t appear to be changing the URL: System ID: oxygen:/eXist-db localhost$eXist-db localhost/db/test.xsl Severity: fatal Description: Exception thrown by URIResolver: Malformed URL xmldb:exist:///db/file.xml(base oxygen:/eXist-db%20localhost$eXist-db%20localhost/db/test.xsl): unknown protocol: xmldb Start location: 12:41 Length: 1 Note, this is the same error that was generated before doing the catalog step. I tried changing the catalog.xml to this, and this did work: <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> <rewriteURI uriStartString="xmldb:exist:///db/" rewritePrefix="oxygen:/eXist-db%20localhost$eXist-db%20localhost/db/"/> </catalog> So delegateURI did not work, but rewriteURI did work. Thanks for the pointers! --len On Apr 1, 2022, at 12:14 AM, Radu Coravu via Exist-open <exi...@li...<mailto:exi...@li...>> wrote: Hi Len, This may not work, but here it goes: Open in Oxygen XML Editor an XML file from the Exist repository (I assume you have configured the Exist repository as a datasource connection in Oxygen). Right click on the opened XML file's tab and choose "Copy Location", then paste it in a text editor, the pasted URL should look like this: oxygen:/..../db/path/to/file.xml Then you can create somewhere on disk a "catalog.xml" file having the content something like: <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> <delegateURI uriStartString="xmldb:exist:///db/" catalog="oxygen:/..../db/"/> </catalog> And in the Oxygen Preferences->"XML Catalogs" page add a reference to this new "catalog.xml" file. The main idea is that the Saxon XSLT processor resolves doc() paths through the XML catalog "uri" mappings to the corresponding Oxygen repository URL and is thus able to retrieve the XML file to access it. Regards, Radu Radu Coravu Oxygen XML Editor On 4/1/22 05:59, Len Schultz wrote: I have an XSL stylesheet which accesses files in eXist, e.g.: <xsl:variable name=“file" select="doc('xmldb:exist:///db/file.xml')"/> This runs well when live, but when I debug the XSL code via oXygen, it cannot access the file in existdb. I can work around it not getting the data from the database, but I can’t work around it failing and not executing the rest of my XSL code. What are some methods you all use to debug XSL code that has lines like this via oXygen? The only workaround I found is to comment out that line so I can debug the rest of the code, but I’d love something more graceful. --len _______________________________________________ Exist-open mailing list Exi...@li...<mailto:Exi...@li...> https://lists.sourceforge.net/lists/listinfo/exist-open _______________________________________________ Exist-open mailing list Exi...@li...<mailto:Exi...@li...> https://lists.sourceforge.net/lists/listinfo/exist-open |