XSLT Newbie Help !!
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 2
- Joined: Wed Jul 04, 2007 2:00 pm
XSLT Newbie Help !!
Greetings everyone! 
I am trying to render an xml-embedded image through XSLT. (pls if you have an example code for that it would be great help!
)
I have the java function which would return a file source on receiving the xml embedded base-64 image string.
The code preview is as follows:
I am getting this exception when calling the above java function from my XSLT
Thanks in advance for info !
Regards

I am trying to render an xml-embedded image through XSLT. (pls if you have an example code for that it would be great help!

I have the java function which would return a file source on receiving the xml embedded base-64 image string.
The code preview is as follows:
Code: Select all
<xsl:stylesheet version="1.0"
xmlns:java="http://xml.apache.org/xslt/java"
xmlns:fn="http://www.mydomain.com/xslt"
exclude-result-prefixes="java fn">
. . .
<xsl:variable name="embeddedpic"
select="formData/instance/EmployeePicture" />
<xsl:variable name="pic" select="fn:com.mydomain.utils.ConversionUtils.base64DecodeString($embeddedpic)"/>

Code: Select all
(XalanXPathException: The function number 'http://xml.apache.org/xslt/java:com.my.utils.ConversionUtils.base64DecodeString' is not available.)
Regards
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Post by sorin_ristache »
Hello,
See how you must define a Xalan extension. Use the attribute
and call the base64DecodeString method with:
Regards,
Sorin
See how you must define a Xalan extension. Use the attribute
Code: Select all
xmlns:fn="xalan://com.mydomain.utils.ConversionUtils"
Code: Select all
<xsl:variable name="pic" select="fn:base64DecodeString($embeddedpic)"/>
Regards,
Sorin
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Post by sorin_ristache »
Check that your class com.mydomain.utils.ConversionUtils contains a method base64DecodeString with two parameters of type org.apache.xalan.extensions.ExpressionContext and org.w3c.dom.traversal.NodeIterator and that the class ConversionUtils is set as extension in the transformation scenario.
Regards,
Sorin
Regards,
Sorin
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