Thanks for posting your XSLT UDF, Joshua - it does a lot of work in a few
lines! Unfortunately we're not CF5-ready here yet (though following today's
security bulletin at http://www.allaire.com/security it looks like we'll
have to upgrade soon) so I can't try it out.
My only worry about using UDFs for XML stuff is that the CFSCRIPT way of
calling objects - CreateObject(etc.) - seems to cause intermittent crashes
on our CF4.5/NT setup, while CFOBJECT is perfectly stable. My guess was that
the CreateObject function doesn't clear up objects in the same way that
CFOBJECT does (in ASP and other languages you have to 'destroy' your objects
explicitly).
Has anyone else noticed this?
Tom
on 10/7/01 10:41 pm, Joshua Miller at [EMAIL PROTECTED] wrote:
> The code weight was my concern as well, I looked at soXML initially and it's
> solid, but it's also overkill for 90% of what I'm doing. I wrote a simple
> UDF that applies an XSL template to and XML document. That's mostly what I
> use. That and a small cfscript that passes attributes to an XSL template.
>
> The soXML tag is great, but heavy. I like the idea of cutting it into
> seperate tags, or even into a series of UDFs that could be called
> individually.
>
> -------------------------------------------------------------------
> My UDF, if anyone cares or wants it:
> -------------------------------------------------------------------
> function xslt(source,style){
> objSource=CreateObject("COM", "Microsoft.XMLDOM", "INPROC");
> objStyle=CreateObject("COM", "Microsoft.XMLDOM", "INPROC");
> objSource.async = "false";
> sourceReturn = objSource.load("#source#");
> objStyle.async = "false";
> styleReturn = objStyle.load("#style#");
> styleRoot = objStyle.documentElement;
> xsloutput = objSource.transformNode(styleRoot);
> return xsloutput;
> }
> -------------------------------------------------------------------
>
> Joshua Miller
> Web Development::Programming
> Eagle Technologies Group, Inc.
> www.eagletgi.com
> [EMAIL PROTECTED]
-----------------------+
cf-xml mailing list
[EMAIL PROTECTED]
http://torchbox.com/xml