Simulate interface URIResolver while editing
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 3
- Joined: Thu Dec 14, 2006 11:19 am
Simulate interface URIResolver while editing
Hello all
I'm evaluating oxygen editor plugin 8.0 with Eclipse 3.2.
My web appl run on Tomcat and we use Xalan to transform at runtime.
We use XSLT to generate HTML. The structure of my project is like the one
my XSL Stylesheet "MyFile.xsl" is something like this:
While editing I would like to try to do a transform and test my "MyFile.xsl" in the Oxygen perspective, but the editor tell me that he cannot find the import file "/MyApp/generalsettings.xsl".
In the scenario I did not find any indication where to specify the root path, how to tell the
"URIResolver" interface where is my root, simulate an HTTP request with the root on $myworkspc//MyApp/websource.
Can anyone tell me what the "best practice" for using Oxygen in that context
Thanks in advance
Claudio
I'm evaluating oxygen editor plugin 8.0 with Eclipse 3.2.
My web appl run on Tomcat and we use Xalan to transform at runtime.
We use XSLT to generate HTML. The structure of my project is like the one
Code: Select all
<workspc>--+-MyApp
+--src
+--websource
+--- MyFile.xsl
+--- MyFile.xml
Code: Select all
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:import href="/MyApp/generalsettings.xsl" /> <<<<<<------- Error: IO exception
<xsl:output method="html" indent="yes"/>
<xsl:template match="/">
<xsl:call-template name="baseListe"/>
</xsl:template>
[snip...]
In the scenario I did not find any indication where to specify the root path, how to tell the
"URIResolver" interface where is my root, simulate an HTTP request with the root on $myworkspc//MyApp/websource.
Can anyone tell me what the "best practice" for using Oxygen in that context
Thanks in advance
Claudio
-
- Posts: 9439
- Joined: Fri Jul 09, 2004 5:18 pm
Dear Cladio,
In order to accomplish this you need to use catalog support.
Just create a file called for example "testCatalog.xml" and save in it the content below.
Of course you have to modify the value of the "rewritePrefix" attribute to the real path on your system.
Then go to Oxygen preferences -> XML -> XML Catalog page, press New and add the new file "testCatalog.xml" to the catalogs list.
Then restart the application.
Read more about Oxygen catalog support here:
http://www.oxygenxml.com/doc/ug-oxygenE ... alogs.html
After this, validating and transforming the stylesheet should resolve the href through the new catalog to the real file.
Hope this helps,
Regards, Radu
In order to accomplish this you need to use catalog support.
Just create a file called for example "testCatalog.xml" and save in it the content below.
Of course you have to modify the value of the "rewritePrefix" attribute to the real path on your system.
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
"http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<rewriteURI uriStartString="/MyApp" rewritePrefix="file:///home/workspace/MyApp"/>
</catalog>
Then restart the application.
Read more about Oxygen catalog support here:
http://www.oxygenxml.com/doc/ug-oxygenE ... alogs.html
After this, validating and transforming the stylesheet should resolve the href through the new catalog to the real file.
Hope this helps,
Regards, Radu
-
- Posts: 3
- Joined: Thu Dec 14, 2006 11:19 am
Hi Radu
Thank for your reply, but it still is not working.
With this situation I continue to get I/O Exception !?
my stylesheet file: <wrkspc>/elabora/webapps/abilitazione/HTVUtente.xsl
my catalog file:<wrkspc>/elabora/webapps/META-INF/testCatalog.xml
Thank for your reply, but it still is not working.
With this situation I continue to get I/O Exception !?
Code: Select all
<wrkspc>/elabora/webapps
+-- elabora.xsl
+--/abilitazione
+--HTVUtente.xsl
+--HTVUtente.xml
+--/META-INF
+--testCatalog.xml
my stylesheet file: <wrkspc>/elabora/webapps/abilitazione/HTVUtente.xsl
Code: Select all
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" >
<xsl:import href="/elabora/elabora.xsl" /> <<<<<<<--- I/O error
<xsl:output method="html" indent="yes"/>
<xsl:template match="/">
<xsl:call-template name="baseListe"/>
</xsl:template>
[snip....]
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
"http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<rewriteURI uriStartString="/elabora"
rewritePrefix="file://c:/java/sviluppo2.0/elabora/webapps"/>
</catalog>
-
- Posts: 3
- Joined: Thu Dec 14, 2006 11:19 am
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