cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Oliver <res1c...@verizon.net>
Subject Re: [vote] finilizing the pending votes on flow [was Re: [RT] Flow/SitemapIntegration]
Date Fri, 17 Jan 2003 06:17:39 GMT
Hi Reinhard,

Just a warning, you should always use the "var" keyword with local 
variables in JavaScript.  Your function should probably read:

function callPipeline(src) {
    var xc = cocoon.componentManager.lookup( myXMLConsumer.ROLE );
    var resolver = cocoon.environment.getObjectModel().get("source-resolver");
    var srce = resolver.resolveURI(src);
    resolver.toSAX( srce, xc );
    return xc;
}

Without "var" you are creating global variables named "xc", "resolver", 
"srce". .

Regards,

Chris

Reinhard Poetz wrote:

>For my flows I use a self-defined function which makes this for me:
>
>function callPipeline(src) {
>    xc = cocoon.componentManager.lookup( myXMLConsumer.ROLE );
>    resolver = cocoon.environment.getObjectModel().get("source-resolver");
>    srce = resolver.resolveURI(src);
>    resolver.toSAX( srce, xc );
>    return xc;
>}
>
>  
>



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message