Hi Joe,
Thanks for your reply. However I just don't get it.
If I make my function return type "String" a string will be placed in the
result tree. If the function return type is Node or DocumentFargment it
returns nothing.
Calling myFunction in the xsl template should result in swapping the
<my:para> with a <p> tag and place the <p> tag in the result tree.
All child elements of the <p> tag should be returned to the source tree for
xslt processing.
But how......
<xsl:template match="my:para">
<myJava:myFunction()/>
</xsl:template>
<xsl:template match="c1">
Do something......
</xsl:template>
I have following XML doc.
<my:para>
<a/>
<b/>
<c>
<c1>
test
</c1>
<c>
</my:para>
A. this function will return NOTHING
public static Node myFunction(ExpressionContext context) {
Node contextNode = context.getContextNode();
Element element=contextNode.getOwnerDocument().createElement("p");
return element;
}
A. this function will return the String
public static String myFunction(ExpressionContext context) {
return "Hello";
}
Peter
On Wednesday 29 September 2004 20:58, Joseph Kesselman wrote:
> I believe the answer was, and is, that extension elements can't return
> content yet.
>
> Extension _functions_ can. See the docs for information about what kinds of
> values will be interpreted as Xalan node-sets when returned by an extension
> function's implementation.
>
> http://xml.apache.org/xalan-j/extensions.html
>
> ______________________________________
> Joe Kesselman, IBM Next-Generation Web Technologies: XML, XSL and more.
> "The world changed profoundly and unpredictably the day Tim Berners Lee
> got bitten by a radioactive spider." -- Rafe Culpin, in r.m.filk
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
--
Med venlig hilsen / Yours sincerely
Peter
http://easyspeedy.com
_______________________________________
European Dedicated Server Hosting
Extremely low prices, secure, and reliable
Linux and BSD distributions only
_______________________________________
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]