Error message when importing stylesheets
Questions about XML that are not covered by the other forums should go here.
-
- Posts: 5
- Joined: Tue Oct 02, 2018 4:10 pm
Error message when importing stylesheets
Post by MarkusHuneke »
Hi,
I am writing a customisation stylesheet for a Docbook to PDF transformation. When I try to import stylesheets via the main file (to get a better overview of all the customisations), I get a series of warnings that various files are imported more than once, e.g.
However, if I omit the import, I get error messages that some framework templates and variables called in the stylesheet do not exist and the transformation scenario cannot be called.
Apparently it is not enough to import the framework in the main file.
How can I get around this behaviour?
I am writing a customisation stylesheet for a Docbook to PDF transformation. When I try to import stylesheets via the main file (to get a better overview of all the customisations), I get a series of warnings that various files are imported more than once, e.g.
This is because in each imported xsl file the docbook.xsl is imported:"frameworks/docbook/xsl/common/utility.xsl is included or imported more than once."
Code: Select all
<xsl:import href="http://docbook.sourceforge.net/release/xsl-ns/current/fo/docbook.xsl"/>
Apparently it is not enough to import the framework in the main file.
How can I get around this behaviour?
-
- Posts: 9431
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Error message when importing stylesheets
HI Markus,
So you are editing a small XSLT module which is imported/included directly or indirectly in the main DocBook XSLT stylesheet, right?
Maybe our "Main Files" support might help: https://www.oxygenxml.com/doc/versions/ ... iting.html
Basically when editing the XSLT module Oxygen needs to know which XSLT stylesheet is the main file which should be validated instead of it.
Regards,
Radu
So you are editing a small XSLT module which is imported/included directly or indirectly in the main DocBook XSLT stylesheet, right?
Maybe our "Main Files" support might help: https://www.oxygenxml.com/doc/versions/ ... iting.html
Basically when editing the XSLT module Oxygen needs to know which XSLT stylesheet is the main file which should be validated instead of it.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 5
- Joined: Tue Oct 02, 2018 4:10 pm
Re: Error message when importing stylesheets
Post by MarkusHuneke »
Hi Radu,
I have already switched on the main file support, but I still get the error message. I am at a loss as to where to look for a solution.
Markus
I have already switched on the main file support, but I still get the error message. I am at a loss as to where to look for a solution.
Markus
-
- Posts: 9431
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Error message when importing stylesheets
Hi,
It's hard to give advice as I do not have the entire setup on my side to experiment with.
If you give me a small sequence of steps about what to do on my side to have a similar setup I could try to see if I can reproduce the problem and look into it.
Regards,
Radu
It's hard to give advice as I do not have the entire setup on my side to experiment with.
If you give me a small sequence of steps about what to do on my side to have a similar setup I could try to see if I can reproduce the problem and look into it.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 5
- Joined: Tue Oct 02, 2018 4:10 pm
Re: Error message when importing stylesheets
Post by MarkusHuneke »
Hi Radu,
ok, I´ll send you here part of my configuration. In the main file you find on top the imported xslt-files. I'm sure I'm doing something obviously wrong.
ok, I´ll send you here part of my configuration. In the main file you find on top the imported xslt-files. I'm sure I'm doing something obviously wrong.
Last edited by MarkusHuneke on Tue Jan 17, 2023 9:55 am, edited 1 time in total.
-
- Posts: 9431
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Error message when importing stylesheets
Hi Markus,
Thanks for the samples.
So you have the main "db5_customize_main_v1.xsl" which imports the docbook.xsl
Oxygen resolves your reference via the XML catalogs to this location:
And then the stylesheet "myqandas.xsl" has another reference to the "docbook.xsl".
Let's say I remove from "myqandas.xsl" the include to "docbook.xsl", and I get validation errors.
Then I enable the "Main Files" support in the Oxygen Project and add there a reference to "db5_customize_main_v1.xsl". After this the "myqandas.xsl" should be reported as valid.
Thanks for the samples.
So you have the main "db5_customize_main_v1.xsl" which imports the docbook.xsl
Code: Select all
<xsl:import href="http://docbook.sourceforge.net/release/xsl-ns/current/fo/docbook.xsl"/>
Code: Select all
OXYGEN_INSTALL_DIR/frameworks/docbook/xsl/fo/docbook.xsl
Let's say I remove from "myqandas.xsl" the include to "docbook.xsl", and I get validation errors.
Then I enable the "Main Files" support in the Oxygen Project and add there a reference to "db5_customize_main_v1.xsl". After this the "myqandas.xsl" should be reported as valid.
Screenshot 2023-01-17 at 07.47.45.png
You do not have the required permissions to view the files attached to this post.
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 5
- Joined: Tue Oct 02, 2018 4:10 pm
Re: Error message when importing stylesheets
Post by MarkusHuneke »
Hi Radu, thats works! Ok, now I understand better, how the main file support works. Thanks for your help!
Kind regards,
Markus
Kind regards,
Markus
-
- Posts: 9431
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Error message when importing stylesheets
Hi Markus,
I'm glad this works for you.
Whenever you refer to a main XSLT file in the Oxygen "Main Files" folder, Oxygen goes recursively through the main XSLT and finds all modules and submodules.
Then when such a module XSLT document is opened and edited, Oxygen actually validated the main XSLT instead of validating the module which may be valid by itself.
The Outline view will present for the current edited XSLT module also components which were gathered from all other modules as well.
Also when using content completion in call templates for example "<xsl:call-template name=""/>" Oxygen should show you all named templates gathered from the entire set of XSLT modules referenced in the main XSLT.
Regards,
Radu
I'm glad this works for you.
Whenever you refer to a main XSLT file in the Oxygen "Main Files" folder, Oxygen goes recursively through the main XSLT and finds all modules and submodules.
Then when such a module XSLT document is opened and edited, Oxygen actually validated the main XSLT instead of validating the module which may be valid by itself.
The Outline view will present for the current edited XSLT module also components which were gathered from all other modules as well.
Also when using content completion in call templates for example "<xsl:call-template name=""/>" Oxygen should show you all named templates gathered from the entire set of XSLT modules referenced in the main XSLT.
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