Discussion
Originator: JelenaNikic
- Created on: 2010-06-21 11:40:04
I have a Page.asp that appears in two different page styles defined by two page styles: Default and NoNavigation. For the NoNavigation page style, I have a NoNavigation PageStyle marker in the FrameMaker source.
I now have a new requirement for another .asp page definition and have tried the approach described here. To do that, I have created another PageStyle marker to my FM source ("LastPage") and edited the pages.xsl transform. Here's what my code snippet in the pages.xsl looks like:
<!-- Page Template --> <!-- -->
<xsl:variable name="VarPageTemplatePath">
<xsl:variable name="VarPageTemplateOption" select="$ParamPageStyle/wwproject:Options/wwproject:Option[@Name = 'page-template']/@Value" />
<xsl:choose> <xsl:when test="$ParamPageStyle/@Name = 'LastPage'">
<xsl:value-of select="wwuri:AsFilePath('wwformat:Pages/PageLast.asp')" />
</xsl:when> <xsl:otherwise>
<xsl:value-of select="$GlobalPageTemplatePath" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable> <xsl:variable name="VarPageTemplate" select="wwexsldoc:LoadXMLWithoutResolver($VarPageTemplatePath)" />
In addition to the above changes, in the pages.xsl, I've also declared the parameters that I used in the modified XSL snippet, such as VarPageTemplatePath, etc.
Now when I try to generate help, ePublisher reports the following errors:
[Error] An error occurred in pipeline 'Page' while processing stage transform 'wwformat:Transforms/pages.xsl'. [Error] Expression must evaluate to a node-set.
Any comments or suggestions will be appreciated.
Sounds like the page template file is missing. Did you mean 'wwformat:Pages/LastPage.asp' instead of 'wwformat:Pages/PageLast.asp'?
-- BenAllums
PageLast.asp is the page template located in <project>\Formats\Sun JavaHelp 2.0\Pages. There are two .asp files in that directory: Page.asp (default) and PageLast.asp. "LastPage" is actually the PageStyle marker in my Frame source.
Jelena,
Everything appears to be in order. The next step would be for you to post your project here to the wiki so that it can be reviewed. Also, you might consider checking out Study Hall for additional assistance.
Hi Ben, my help project and source files are attached. Thanks for looking at it.
Jelena,
Have a look at the updated project and see if it isn't doing what you want/expect.
Great--thanks for fixing my project file. I'll test it out and let you know how it goes.