how to call saxon functions from xslt in Oxygen?
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 2
- Joined: Mon Apr 27, 2009 4:55 pm
how to call saxon functions from xslt in Oxygen?
Hi,
I'm trying to use some saxon extensions in my xslt, but they are thrown straight to my output html (not parsed).
I'm using Oxygen 10.2, saxon 6.5.5, and the code I want to use is:
<xsl:variable name="selectedLanguage" select="'en-GB'" saxon:assignable="yes"/>
<xsl:template match="root">
<xsl:variable name="i" select="0" saxon:assignable="yes"/>
<saxon:while test="$i < 2">
<html><head><title>bla</title><body>
<p><value-of select="$selectedLanguage"/></p>
</body></html>
<saxon:assign name="selectedLanguage" select="fr-FR"/>
<saxon:assign name="i" select="$i+1"/>
</saxon:while>
</xsl:template>
Now for my resulting HTML I get:
<saxon:while test="$i < 2">
<html><head><title>bla</title><body>
<p>en-GB</p>
</body></html>
<saxon:assign name="selectedLanguage" select="fr-FR"/>
<saxon:assign name="i" select="$i+1"/>
</saxon:while>
I have defined the saxon ns in xsl:stylesheet.
What am I doing wrong? These are standard saxon extensions so I don't think I need to define anything special, right? Or do I? And if so, how?
I'm trying to use some saxon extensions in my xslt, but they are thrown straight to my output html (not parsed).
I'm using Oxygen 10.2, saxon 6.5.5, and the code I want to use is:
<xsl:variable name="selectedLanguage" select="'en-GB'" saxon:assignable="yes"/>
<xsl:template match="root">
<xsl:variable name="i" select="0" saxon:assignable="yes"/>
<saxon:while test="$i < 2">
<html><head><title>bla</title><body>
<p><value-of select="$selectedLanguage"/></p>
</body></html>
<saxon:assign name="selectedLanguage" select="fr-FR"/>
<saxon:assign name="i" select="$i+1"/>
</saxon:while>
</xsl:template>
Now for my resulting HTML I get:
<saxon:while test="$i < 2">
<html><head><title>bla</title><body>
<p>en-GB</p>
</body></html>
<saxon:assign name="selectedLanguage" select="fr-FR"/>
<saxon:assign name="i" select="$i+1"/>
</saxon:while>
I have defined the saxon ns in xsl:stylesheet.
What am I doing wrong? These are standard saxon extensions so I don't think I need to define anything special, right? Or do I? And if so, how?

-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: how to call saxon functions from xslt in Oxygen?
Post by sorin_ristache »
Hello,
You have to set the prefix saxon as extension prefix with the attribute:
in your stylesheet.
Regards,
Sorin
You have to set the prefix saxon as extension prefix with the attribute:
Code: Select all
extension-element-prefixes="saxon"
Regards,
Sorin
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ 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