You cannot modify the source tree in XSLT, so trying to modify the context
node is not going to work, even with an extension function.

Please post a small example of your input document, and what you want the
expected output to be.  Alternatively, you can take your question to the
Mulberry XSL list, which is the best place to ask XSLT questions that are
not necessarily specific to a processor:

   http://www.mulberrytech.com/xsl/xsl-list/index.html

If you're interested in examples of how to return a node-set from an
extension function, I suggest you grep the source code for the string
"createNodeSet" and just look at the code.  There are several standard
functions which return node sets.

Dave



                                                                                       
      
                    Ruffieux                                                           
      
                    Patrick              To:     "'[EMAIL PROTECTED]'"          
      
                    <pruffieux@na        <[EMAIL PROTECTED]>                    
      
                    gra.com>             cc:     (bcc: David N Bertoni/CAM/Lotus)      
      
                                         Subject:     Problem with my XSL- c++ 
function      
                    07/23/2001                                                         
      
                    08:00 AM                                                           
      
                    Please                                                             
      
                    respond to                                                         
      
                    xalan-dev                                                          
      
                                                                                       
      
                                                                                       
      



Hello,

My problem:

data =
zipcode
10000
10001
10002
10003
10004
10010
10011
10020
...

           i have a function in xsl like this :

                     </xsl:element>
                               <xsl:value-of
select='calc-zip("BLACKOUT_CARD_GROUP", "CARD_GROUP_ID", "CARD_GROUP")'/>
                     </xsl:element>

i will a result like that :
<ZipCode size=5>10000</ZipCode>
<ZipCode size=2>10010</ZipCode>
<ZipCode size=1>10020</ZipCode>
...


So i'm searching good samples (not the too simples of the apache doc) for
xsl-functions implemented with the C++ Api xalan 1.0.
Links or books references are welcome.

The only difficult i have is which return type is needed for the above
problem ?
           * If i modify the context with
"context->addChild(xalanElement);"
(many times) must i return a value or a
        "return executionContext.getXObjectFactory().createNull();" is
sufficient.
           * Where are good sample(s) for how to use the
"executionContext.getXObjectFactory().createNodeSet( something );"
             Doc is really poor !!

Sorry if these kind of question have already submitted, but i cannot access
the archive :-(
Sorry again for my english, but it's not my first language.
And finally thank you if anybody can help me.

Patrick Ruffieux.











Reply via email to