Ignore:
Timestamp:
11/23/06 22:24:42 (6 years ago)
Author:
sys
Message:

Implementation api IData.getNode()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Jav_CO/com/scenari/m/co/donnee/WDonneeXPathOnSrcDynamique2.java

    r7458 r7478  
    4242 
    4343import org.w3c.dom.Element; 
     44import org.w3c.dom.Node; 
    4445 
    4546import com.scenari.m.co.agent.IWAgent; 
     
    108109        pWriter.write(getString(pDialog, pOwner, pArguments)); 
    109110    } 
     111     
     112    public final Node getNode(IHDialog pDialog, Object pOwner, Object pArguments) throws java.lang.Exception { 
     113        try { 
     114            XPathContext vPathContext = ((IWAgent)pOwner).hGetInstance().hPopXPathContext(); 
     115            VariableStack vStack = vPathContext.getVarStack(); 
     116            vStack.pushVariable(ZXPath.QNAME_VDIALOG, new XObject(pDialog)); 
     117            vStack.pushVariable(ZXPath.QNAME_VAGENT, new XObject(pOwner)); 
     118                        if(pArguments != null){ 
     119                                vStack.pushVariable(ZXPath.QNAME_VARGUMENTS, new XObject(pArguments)); 
     120                        } 
     121            vStack.markGlobalStackFrame(); 
     122            vPathContext.setPrefixResolver(new PrefixResolverDefault(fSrcRoot)); 
     123            return HDonneeUtils.hGetNodeFromNodeIterator(fXPathCompiled.execute(vPathContext, fSrcRoot).nodeset(), fMime); 
     124        } catch (Exception e) { 
     125            throw (Exception) HLogMgr.hAddMessage(e, "Echec au calcul XPath d'une donnee (xpathOnSrc-dynamique)."); 
     126        } 
     127    } 
    110128 
    111129    /** 
Note: See TracChangeset for help on using the changeset viewer.