Re: XML-XSL-CF_SOXML

2001-09-27 Thread tom dyson

Hi Timur

Our CF XML Toolkit allows you to transform an XML document using a given XSL
Stylesheet (and to apply optional parameters to the transformation). It
currently uses the MSXML DOM object, though there are plans afoot to create
a platform-independent version using Xerces and Xalan. Other parts of the
toolkit allow you to 'query' an XML document, using XPath or SQL, just like
you can query a database with CFQUERY.

To download the toolkit, go to

http://torchbox.com/xml

There's also a CF / XML mailing list at

http://torchbox.com/xml/list.cfm

Hope this helps

Tom

-+
tom dyson
t: +44 (0)1608 811870
m: +44 (0)7958 752657
[EMAIL PROTECTED]
http://torchbox.com

 Hi everybody,
 my question is simple :
 I have an XML and a XSL file.
 XSL file is formatted in a way that it outputs HTML tags.
 I am using CF_SOXML custom tag to transform the XSL file into a CF file.
 
 But whenever I do that, the transformation returns XSL tags. I checked
 http://forums.siteobjects.com for a solution but couldn't find anything. I
 am using MSXML 2.0+.
 So my question is (which was simple, remember) :
 What are other ways to transform XML and XSL into HTML using Cold Fusion and
 MSXML DOM object.
 Are there other people that used SOXML and succeded ?
 
 Thanks guys and have a great day. Bye
 
 
 Timur Catakli

FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: OT: XML Questions

2001-08-30 Thread tom dyson

Hi there

 So, anyways, I'm creating a DTD for an XML document and have a few
 questions...
 
 I have a vendor that has an address.  The address consists of various elements
 such as street, city, etc.  Now then, the address element itself has no
 attributes or data directly in it.  Is it worth having an address element?
 
 e.g.
 
 address
 street123 any street/street
 citycalgary/city
 /address

While not necessary, the address element is probably a good idea: it helps
to define the child elements and might make it easier for you to get at
various bits of your document later on (using XPath functions in DOM or XSLT
manipulation). It also makes your document more human-readable, which is
often a good thing. Finally, 'branchy' documents generally allow for better
parser performance than flat ones - it's quicker for an XML processor to
find 'vendor/address/city' than to scan all the nodes for 'city' elements.

 Also, when creating the XML document, if there is no street, should I do
 street/street or just omit the attribute altogether?  Do parsers get angry
 when there are elements that are empty?

Parsers generally cope with empty elements pretty well. My opinion is that
it's better to have an empty element than to omit it altogether (unless
keeping your document compact is a crucial consideration), since it's
usually easier to edit the contents of an element than to check whether or
not it exists and then create a new one with the relevant data. And again,
it makes the structure of the document more obvious to human readers.

We've set up a CF / XML mailing list where this question wouldn't be quite
so OT! If you're interested, you can join up at

http://torchbox.com/xml/

Best wishes

Tom

-+
tom dyson
t: +44 (0)1608 811870
m: +44 (0)7958 752657
[EMAIL PROTECTED]
http://torchbox.com



~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: CF Query to XML

2001-06-26 Thread tom dyson

 Is there a custom tag that will take the result set of a query and write it
 to an XML file?

CF_QueryToXML, at

http://devex.allaire.com/developer/gallery/info.cfm?ID=04AB8F8C-63C0-11D5-83
F600508B94F380method=Full

does what you want. Here's the description:

QueryToXML allows you to query a database and retrieve a recordset into
an XML variable. You can then utilize that variable in distributed
transactional processing. This file uses a ColdFusion XML parsing custom tag
(XMLToFromStruct, included) to aid in XML generation.

My tag CF_XMLQUERY does the opposite: it converts an XML variable into a
query. It's a free download from:

http://torchbox.com/xml

Tom

-+
tom dyson
t: 01608 811870
m: 07958 752657
[EMAIL PROTECTED]
http://torchbox.com


~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: XML with ColdFusion

2001-06-19 Thread tom dyson

Hi Josh

 The following code opens and outputs an XML file based on an XSL template
 using ASP  I was wondering if there are similar functions in CF or if
 someone could point me in the right direction towards functions or whatnot
 ..

 %
 'Load the XML
 set xml = Server.CreateObject(Microsoft.XMLDOM)
 xml.async = false
 xml.load(Server.MapPath(myfile.xml))
 
 'Load the XSL
 set xsl = Server.CreateObject(Microsoft.XMLDOM)
 xsl.async = false
 xsl.load(Server.MapPath(myfile.xsl))
 
 Response.Write(xml.transformNode(xsl))
 %

Here's the code you need:

cfobject action=create class=MSXML2.DOMDocument name=xml
cfobject action=create class=MSXML2.DOMDocument name=xsl

cffile action=read file=d:\xml\myxmlfile.xml variable=xmlfile
cffile action=read file=d:\xml\myxslfile.xml variable=xslfile

cfscript
xml.load(xmlfile);
xsl.load(xslfile);
transformed = xml.transformNode(xsl);
writeoutput(transformed);
/cfscript

You might also be interested in my new CF/XML mailing list - I've also
written a few XML custom tags which I'll be publishing through the list:

http://torchbox.com/xml

Best wishes

Tom

-+
tom dyson
t: +44 (0)1608 811870
m: +44 (0)7958 752657
[EMAIL PROTECTED]
http://torchbox.com


Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: XML with ColdFusion

2001-06-19 Thread tom dyson

Hi Larry

 I've a similar question.  I've a need to communicate with an application
 that generates either some generic xml formatted data, or csv.   My
 preference would be to go with some sort of xml - perhaps SOAP based,
 so that the data is self-described .
 
 However, I'm uncertain where to start.  I've seen older notes from
 Allaire mentioning SOAP support was being investigated, but I'm uncertain
 whether anyone is using it now or not.
 
 Can anyone comment on this?

SOAP is certainly going to be an important standard, judging by the W3C's
approval: read 

www.w3.org/2000/xp/Group/Admin/minutes-oct1100/soap-xp-wg_files/frame.htm

for a useful overview.

However, if you're looking for Cold Fusion-friendly, self-describing XML
data, then WDDX (http://www.openwddx.org) is your answer. If the application
that you need to communicate with won't create valid WDDX packets, but does
speak plain XML, then Cold Fusion supports XML very well through CFOBJECT
and Microsoft's MSXML parser.

My CF_XMLQUERY tag converts a local or remote XML file into a standard query
result set, which you can manipulate or output as usual. Email me off list
or sign up at http://torchbox.com/xml if you think this might be helpful.

Tom

-+
tom dyson
t: 01608 811870
m: 07958 752657
[EMAIL PROTECTED]
http://torchbox.com


~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Good resource on CF/XML integration?

2001-05-24 Thread tom dyson

Hi

 Is there any good resources on CF/XML integration?  Any good web sites??

I'm giving a free seminar on CF/XML integration sometime in June, in London,
UK. You can sign up for it at

http://torchbox.com/xml

If you can't come, sign up anyway and I'll send you the support pack
(documentation, code samples, links to resources on the web).

 Yea, but how do you grab a .xml page and parse it out into your HTML?  I
 have a company that wants to feed us info, and they have given me a url to a
 ..xml page.  I want to group the info and format the output.  Can CF_SOXML do
 this?

I've written a custom tag which mimics CFQUERY, but uses an XML packet:

cf_xmlquery   name = myquery
xmldata = http://torchbox.com/myxml.xml;
xpath = //people

cfoutput query = myquery
#person_id# #person_name# br /
/cfoutput

The 'xmldata' field - here shown coming from a URL - can also be a file on
the server or a local variable. You need to know a bit of XPATH to make the
most of it, but it's pretty easy (it's a bit like the XML equivalent of
SQL). 

If you're interested in this tag (I've also written XML versions of CFINSERT
and CFUPDATE) let me know and I'll send you a beta version.

Tom

-+
tom dyson
t: 01608 811870
m: 07958 752657
[EMAIL PROTECTED]
http://torchbox.com


Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Good resource on CF/XML integration?

2001-05-24 Thread tom dyson

Make sure you have a reasonably current version of the MSXML parser on your
4.5 server: MSXML 3.0 will definitely handle all the SOXML stuff and is
freely available from

http://msdn.microsoft.com/xml/default.asp

-+
tom dyson
t: 01608 811870
m: 07958 752657
w: http://torchbox.com
cf/xml resource pack: http://torchbox.com/xml

 From: Dave Hannum [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 Date: Thu, 24 May 2001 08:12:05 -0400
 To: CF-Talk [EMAIL PROTECTED]
 Subject: Re: Good resource on CF/XML integration?
 
 Paul,
 
 I had this up and running last evening on a 4.0 server.  I loaded it up this
 morning on a 4.5.0.0 server and get the following message when I run the
 soxml tag: (running xml2cf)
 
 DOM Error
 
 Interface not registered | Line:0
 
 The error occurred while processing an element with a general identifier of
 (CFTHROW), occupying document position (242:7) to (242:115).
 
 
 Any clues?


~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: SQL Generator

2000-11-15 Thread Tom Dyson


What I'm looking for is a SQL generator that will handle table joins and
multiple criteria. The same kind of functionality as the query builder in
Studio, but with a more intuitive, CF-based interface. Does anyone know of
such a thing? Or - if I wrote one, would anyone be interested in it?

Tom

 
 There is no username and password for the demo.
 
 The demo is just hard coded html to give a view of how the generator works
 and the files that it will produce.  To follow the demo just click the
 submit buttons as if you were using the actual product ie
 
 choose a database and click connect (the demo is using the Coffee database).
 
 choose a table and click the link "generate SQL" (the demo is hard coded for
 the beans table).
 
 You can see the sql that is produced. (note all sql in the trial and full
 version uses 
 #val(form.variable)# to eliminate malicious sql in fields that arent char
 etc.  
 
 In addition you can view the files that will be produced.
 
 Another option would be to download the trial version and try the product
 with your own datasources.
 
 Here is the url again
 http://www.aloha-webdesign.com/sqlgen/


Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]



Load testing CF

2000-10-31 Thread Tom Dyson

Hi there

Do any of you have experience of load-testing software for your CF apps? We
want to simulate 100 simultaneous users for a large intranet app. We don't
want to spend too much...

Thanks

Tom



Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]



query builder

2000-09-07 Thread Tom Dyson


Hi there

I'd like to make a query builder in Cold Fusion, so that users can refine
their searches by picking a table, choosing fields and providing criteria,
without having to know SQL. Something like the query builder in CF Studio
but even simpler - perhaps with a wizard interface. Has anyone done or seen
anything like this?

Thanks a lot

Tom

--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



creating graphs in CF

2000-08-09 Thread Tom Dyson

Does anyone have experience of creating graphs in Cold Fusion? They need to
be line graphs, so unfortunately it's not possible to create them in
dynamically generated HTML. I don't want to use Java applets, either. I
guess the answer will be some kind of Java Servlet which takes variables and
creates gifs on the fly - if you can point me in the right direction I'd be
very grateful.

Thanks

Tom

P.S. Please respond directly as well as to the list, because I'm on the
archived version.


--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



When should I use CFLOCK?

2000-07-06 Thread Tom Dyson

The Allaire knowledge base article on monitoring memory usage states:

One of the most common causes [of increased memory usage] are improperly
locked access to session, application, and server variables. These variables
are stored in memory and need to be enclosed in a CFLOCK tag with the
appropriate SCOPE attribute specified (i.e. session, application, or server)
when referenced.

while Ben Forta says:

Caution: avoid unnecessary use of CFLOCK. Forcing code to single-threaded
use only can seriously impact system performance.

We're building an application which uses session and application variables
on every page (for security and user customisation). Should we use cflock
when we read them? Or when we write them? Or both? Does anyone have any
guidelines on cflock usage?

Thanks

Tom

--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



custom tag for calculating business hours

2000-07-06 Thread Tom Dyson


I'm struggling to write a tag that will give me the number of business hours
between two specified date/time fields. What I want is something like this:

cf_businesshours   bh_start = #starttime#   bh_end = #endtime# 

which will give me the total hours, not including weekends, bank holidays
(which are supplied as a list variable #application.holidays#) and non-work
hours (e.g. 6pm to 9am - again supplied as application variables #workstart#
and #workfinish#). 

e.g. if #starttime# was friday june 10th 15.00 and #endtime# was monday june
13th 10.00 #businesshours# would be 4.

The tag is for an extranet application where we need to check whether or not
users have performed a specific task within x working hours of accepting it.
In most cases it will run as a scheduled query and bh_end will equal
#now()#.

I can work it on in terms of days (using the DateDiff function) but it's
tricky to find out which hours fall on which days. Has anyone written
something like this? Or do you have any suggestions on how I should go about
it?

Please copy any responses me as well as to the list (I'm subscribed to the
archived version).

Thanks very much

Tom

--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



WAP/wml and CF

2000-04-25 Thread Tom Dyson


Does anybody know of any resources on developing WAP applications in CF?

Thanks very much

Tom

--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.