Using a custom URI Resolver with Oxygen XSLT Debugger
Oxygen general issues.
-
- Posts: 5
- Joined: Tue Jul 04, 2006 3:57 pm
- Location: www.mainsys.be
Using a custom URI Resolver with Oxygen XSLT Debugger
We've got an XML document produced by a J2EE application deployed on Tomcat.
The application call a web service (PdfProviderService) in order to generate a PDF document. The web service is deployed on another machine running Tomcat + Axis.
The web service needs the XML document and an XSL document. These files are send as SOAP attachments from the J2EE application. The rendering is done by the web service through Apache FOP.
Sometimes, the XSL document references other xsl documents via <xsl:import> and <xsl:include>. In order to resolve these URIs during the rendering by the web service, a custom URI resolver is added to the transformer (Xalan) used by FOP. The relative URIs are resolved using a "base.uri" parameter when calling the web service. That way the web service can request to the J2EE application the dependent XSL documents throught HTTP. As a matter of fact, all the XSL documents are store in a repository within the J2EE application.
So when I try to debug a master XSL document containing links to dependent XSL document through the Oxygen XSLT debugger, the debugger can't manage to resolve all the relative URIs of these dependent XSL documents. Is there any way to setup my custom URI Resolver in the Oxygen XSLT Debugger in order to solve this issue ?
I thank you in avance for your help,
Bertrand GILLIS
Mainsys Engineering SA
http://www.mainsys.be
The application call a web service (PdfProviderService) in order to generate a PDF document. The web service is deployed on another machine running Tomcat + Axis.
The web service needs the XML document and an XSL document. These files are send as SOAP attachments from the J2EE application. The rendering is done by the web service through Apache FOP.
Sometimes, the XSL document references other xsl documents via <xsl:import> and <xsl:include>. In order to resolve these URIs during the rendering by the web service, a custom URI resolver is added to the transformer (Xalan) used by FOP. The relative URIs are resolved using a "base.uri" parameter when calling the web service. That way the web service can request to the J2EE application the dependent XSL documents throught HTTP. As a matter of fact, all the XSL documents are store in a repository within the J2EE application.
So when I try to debug a master XSL document containing links to dependent XSL document through the Oxygen XSLT debugger, the debugger can't manage to resolve all the relative URIs of these dependent XSL documents. Is there any way to setup my custom URI Resolver in the Oxygen XSLT Debugger in order to solve this issue ?
I thank you in avance for your help,
Bertrand GILLIS
Mainsys Engineering SA
http://www.mainsys.be
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Post by sorin_ristache »
Hello,
Any <xsl:import> and <xsl:include> reference resolved by your custom URI resolver in the web service must be resolved through one of the XML catalogs configured in <oXygen/> in Options -> Preferences -> XML -> XML Catalog. Basically such a catalog maps a URI of a resource referred in an XML or XSLT document to other URI. That means the stylesheets referred by the <xsl:import> and <xsl:include> instructions will be looked up in the catalog with their full path. For example if the stylesheet C:\path\to\folder\stylesheet.xsl contains an instruction
the URI looked up in the catalog is: C:\path\to\folder\relativePath\included.xsl, so your catalog must contain an entry:
If all the included/imported stylesheets are located in the same folder you can resolve allthe references with only one catalog entry:
Regards,
Sorin
Any <xsl:import> and <xsl:include> reference resolved by your custom URI resolver in the web service must be resolved through one of the XML catalogs configured in <oXygen/> in Options -> Preferences -> XML -> XML Catalog. Basically such a catalog maps a URI of a resource referred in an XML or XSLT document to other URI. That means the stylesheets referred by the <xsl:import> and <xsl:include> instructions will be looked up in the catalog with their full path. For example if the stylesheet C:\path\to\folder\stylesheet.xsl contains an instruction
Code: Select all
<xsl:include href="relativePath/included.xsl">
Code: Select all
<uri name="file:///C:/path/to/folder/relativePath/included.xsl" uri="http://your.hostname.com/path/to/actual/stylesheet.xsl"/>
Code: Select all
<rewriteURI uriStartString="file:///C:/path/to/folder/" rewritePrefix="http://your.hostname.com/path/to/actual/"/>
Regards,
Sorin
-
- Posts: 5
- Joined: Tue Jul 04, 2006 3:57 pm
- Location: www.mainsys.be
Dear Sorin,
I would like to thank you for your quick reply and most of all, for your very accurate explanation. I will give a try this morning.
Regards,
Bertrand GILLIS
Mainsys Engineering SA
http://www.mainsys.be
I would like to thank you for your quick reply and most of all, for your very accurate explanation. I will give a try this morning.
Regards,
Bertrand GILLIS
Mainsys Engineering SA
http://www.mainsys.be
-
- Posts: 5
- Joined: Tue Jul 04, 2006 3:57 pm
- Location: www.mainsys.be
Hello Sorin,
I works like a charm thank you. But I've got another question related to Oxygen XSLT Debugger...
When I launch the Oxygen XSLT Debugger, I can't set up any breakpoint in the imported or included stylesheet linked to my master stylesheet. Moreover, when I run step by step the transformation from the master stylesheet, the included or imported stylesheet is never opened in the debugger. So I can't see which instruction is currently executing from the included or imported stylesheet. It seems that setting breakpoint is only allowed from stylesheets present within the current workspace. Is there any way to see within the debugger the current processing instruction from an included or imported stylesheet ?
Once again, I thank you in advance for your help.
Bertrand GILLIS
Mainsys Engineering SA
http://www.mainsys.be
I works like a charm thank you. But I've got another question related to Oxygen XSLT Debugger...
When I launch the Oxygen XSLT Debugger, I can't set up any breakpoint in the imported or included stylesheet linked to my master stylesheet. Moreover, when I run step by step the transformation from the master stylesheet, the included or imported stylesheet is never opened in the debugger. So I can't see which instruction is currently executing from the included or imported stylesheet. It seems that setting breakpoint is only allowed from stylesheets present within the current workspace. Is there any way to see within the debugger the current processing instruction from an included or imported stylesheet ?
Once again, I thank you in advance for your help.
Bertrand GILLIS
Mainsys Engineering SA
http://www.mainsys.be
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Post by sorin_ristache »
Hello,
Regards,
Sorin
In the XSLT Debugger perspective of the Eclipse plugin you can set breakpoints only in files included in the current Eclipse workspace. The Eclipse platform does not allow placing markers on files outside the current workspace. For this you have to run the transformation in the XSLT Debugger perspective of <oXygen/> standalone. Just open the file with File -> Open or File -> Open URL or step in up to the included/imported stylesheet and place breakpoints from menu Edit -> Breakpoints.bgillis wrote:When I launch the Oxygen XSLT Debugger, I can't set up any breakpoint in the imported or included stylesheet linked to my master stylesheet.
Regards,
Sorin
-
- Posts: 5
- Joined: Tue Jul 04, 2006 3:57 pm
- Location: www.mainsys.be
That's what I've figured out.
Thanks for your excellent support.
Bertrand GILLIS
Mainsys Engineering SA
http://www.mainsys.be
Thanks for your excellent support.
Bertrand GILLIS
Mainsys Engineering SA
http://www.mainsys.be
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