No Template Exists

Oxygen general issues.
kpmurphy
Posts: 1
Joined: Fri Nov 05, 2010 12:47 am

No Template Exists

Post by kpmurphy »

I have three files all in the same project called default.xsl, common.xsl and structure.xsl. In default.xsl, I call all the other two:

Code: Select all

<xsl:include href="common.xsl" />
<xsl:include href="structure.xsl" />
On the page common.xsl I have a template called FormatLink like so:

Code: Select all

<xsl:template name="FormatLink">
....bunch of code ....
</xsl:template>
On the page structure.xsl, I call the template like so:

Code: Select all

<xsl:call-template name="FormatLink" />
So when I deploy to my server, this all works just fine. However, in Oxygen, I keep getting the message "[Saxon6.5.5] No template exists named FormatLink". Is there any way I can get the structure.xsl file to see that the template in question is located not on the parent page but on a sibling page?
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: No Template Exists

Post by adrian »

Hello,

You can resolve this in Oxygen by creating a custom validation scenario that validates the master stylesheet(default.xsl) and associating this scenario with each of the included stylesheets.

1. Create a new validation scenario(Document -> Validate-> Configure Validation Scenario, Use custom validation scenario, press New).

2. Give the scenario a proper name and Add a new validation unit.

3. In the Add validation unit dialog browse for the master stylesheet(default.xsl) in the URL field. Leave everything else to their defaults and just press OK. OK in all other dialogs.

4. You can associate multiple stylesheets from the project view with the custom validation scenario you have just configured. You can do this by selecting multiple stylesheets in the project view and right clicking and selecting Validate -> Configure Validation Scenario. Then select the scenario from the list and press OK.

5. Now you should have automatic and also manual validation of all these stylesheets in the correct context.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply