You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Donald Ball <ba...@webslingerZ.com> on 2000/07/26 07:15:48 UTC

problem writing a java extension function

Hi guys. I used to use this construct to begin my extension methods for
Xalan-J (those that returned values anyway):

public static DocumentFragment getTimestampInput
    (XSLProcessorContext context, Element element)
    throws Exception {
    Document document = context.sourceNode.getOwnerDocument();
    DocumentFragment results = document.createDocumentFragment();

this doesn't seem to be working reliably any longer with xalan-1.1D01.
what is the preferred methodology when writing a java extension method
that returns a set of elements? i'm looking to write a method that takes a
string as input and returns a set of paragraph elements which contain
substrings (split apart at some arbitrary boundary, typically double
newlines). nothing fancy, but it's a common request. i'm trying to make my
extension element operate like so:

<tf:paragraphize><xsl:value-of select="content"/></tf>paragraphize>

but i welcome alternate suggestions. i'm not stranger to xalan extension
functions, but i'm honestly a little stumped here...

- donald