Click to search Andy Jarrett.co.uk RSS feed

Loading Twitter

My blog has moved

Please update your bookmarks and feeds for my site.

I now have a Mango Blog at:

http://www.andyjarrett.com/blog

Feed URL: http://feeds.feedburner.com/andyjarrett

Comments Comments (0) | Print Print | Send Send | 1195 Views

Frameworks DTD files

I hope this doesn't come across as a moan as its meant to be more of a general question to the community. But with all the main frameworks out there running on XML config files, where are the official DTD's hosted for these? I know there are several around hosted in odd locations (no disrespect), but I was just looking to put together a definitive list of the locations.

I know you can get them via subversion etc but shouldn't/couldn't they be hosted on the respective sites??

Comments Comments (4) | Print Print | Send Send | 3393 Views

CFXML and CF tags gotcha

As i'm preparing to type this post what I'm about to says is so obvious its annoying. When you are using the <cfxml> tag you cannot have xml tags that begin with "cf" as Coldfusion tries to parse them. For example:

view plain print about
1<cfxml variable="xml1">
2    <myXml>
3        <cftest>my data</cftest>
4    </myXml>
5</cfxml>

Would fail with something like "A tag starting with 'CF' has been detected. This tag is not supported by this version of ColdFusion. Please verify your typo and try again. Unknown tag: cftest. "

The workaround:

Modify the tag from <cftest> to <ctest>

view plain print about
1<cfxml variable="xml2">
2<myXml>
3    <ctest>my data</ctest>
4</myXml>
5</cfxml>

The afterwards get regex to make the changes.

view plain print about
1<cfset xml2 = reReplace(xml2, "<(.*?)c", "<\1cf" , "all") />
To explain the regex.
  • Attribute 1, is the string your are modifying.
  • Attribute 2, is the regex here. Here I am using creating a back reference (think of it as a variable) to catch the closing tag backslash.
  • Attribute 3, is the same as att. 2 but we remove the brackers and call the back reference via "\1".
  • Tells us to capturing all occurances.

Comments Comments (8) | Print Print | Send Send | 4747 Views

Lightweight XML Editor

FoxeFoxe is a lightweight XML editor written in C++ which is excellent for quickly examining and reviewing XML files. It's a standalone app so know install either and it roughly uses 1.5 to 3 times the memory size of a document.

Its lacking schema validation, but handles Unicode file with and without BOM plus a range of other encoding styles.

http://www.firstobject.com/dn_editor.htm

Comments Comments (0) | Print Print | Send Send | 3801 Views

ColdFusion Meeting Calendar Pod

I've added a new pod to my site which now reads the ColdFusion Google calendar so you can see up coming events.

I've managed to add a couple of events myself including some from the Online CF meetup group, also thanks to Mark Drew as well as he is keeping up the UKCFUG schedule.

If you are an CFUG organiser (or any CF related organiser) leave me a comment here and i'll add you as an administrator so you can add your events. You'll need a Gmail account!

To subscribe to the calendar use one of the following links:

[XML]
[iCal]

Comments Comments (2) | Print Print | Send Send | 2857 Views

ColdFusion Meeting Calendar

Google CalendarI have created a public Google Calendar for ColdFusion meetings. The idea I had behind this is that if you run any kind of CF meeting, whether it be online (Online CF Group), at a meeting place, UKCFUG, or just a demo'ing something on a IRC chanel you can update it here so everyone knows about it and also be able to merge it with you current calendar.

The only problem is that I'm sure that I still have to invite you to join if you want to add/edit your meetings details, but anyone can view/subscribe to it.

At the moment I've only added the next UKCFUG one for tonight so you can see it in action. If you are an event organiser (and you have a gmail/calendar accout) and you want to be able to edit drop me a line in the comments and i'll enable you to add comments.

To subscribe use one of the following links

[XML]
[iCal]

I know this might seem a little presumptuous of me - but if you have any ideas on how to have a central location for meeting details drop me a line.

Comments Comments (7) | Print Print | Send Send | 4448 Views

Unqualified XML's and cfheader

I've been playing around with creating an XML file this morning from a plain .cfm page and came across an annoyance. Now I've done this loads but this morning I was creating my own Ajax functions which meant the cfm page had to return a fully qualfied as XML which was passed into Javascripts XML parser, but Js was passing an error. The test code was simple

[xml.cfm]

view plain print about
1<cfheader name="Content-Type" value="text/xml">
2<?xml version="1.0" encoding="UTF-8"?>
3<root>
4 <node>
5 <child>1</child>
6 </node>
7<root>

The problem was CFHEADER adds a couple of blank lines to the top of the page meaning that the page did not pass as XML. Well thanks to Rob Wilkerson on CF-Talk the anser was obvious simple - use CFCONTENT

view plain print about
1<cfcontent type="text/xml" reset="Yes" />
2<?xml version="1.0" encoding="UTF-8"?>
3<root>
4 <node>
5 <child>1</child>
6 </node>
7<root>

I did try a few other ways of surpressing the white space usin a variety of methods but nothing came close.

Comments Comments (4) | Print Print | Send Send | 3593 Views

Cfeclipse ANT build update

For anyone who is using Ant script to get the CFE nightly builds will need to update the srcURL property.

The srcURL should now be http://cfeclipse.org/nightly/cfeclipse_nightly.zip

Below is the updated code

view plain print about
1<?xml version="1.0" encoding="UTF-8"?>
2<project name="build-nightly-cfe" default="setup" basedir=".">
3 <description>
4 Download the CFE nightly build and extracts to your pluggin folder
5    </description>
6    
7    <!-- =================================
8    Some values
9    ================================== -->

10    <property name="cfePluginFolder" value="d:/program files/eclipse/" />
11 <property name="srcURL" value="http://www.cfeclipse.org/beta/cfeclipse_beta.zip" />
12    
13 <!-- =================================
14 target: setup
15 ================================= -->

16 <target name="setup" depends="init,downloadZip,unzip,cleanDirs"
17 description="-->Sets up your CFeclipse nightly build">

18 <tstamp/>
19 <echo message="Build fininshed at ${DSTAMP}" />
20 </target>
21
22 <!-- - - - - - - - - - - - - - - - - -
23 target: init
24 - - - - - - - - - - - - - - - - - -->

25 <target name="init" description="Build directory structure">
26 <mkdir dir="tmp"/>
27 </target>
28
29
30 <!-- - - - - - - - - - - - - - - - - -
31 target: cleanDirs
32 - - - - - - - - - - - - - - - - - -->

33 <target name="cleanDirs" description="clean up">
34     <delete dir="${basedir}/tmp" />
35 </target>
36
37 <!-- - - - - - - - - - - - - - - - - -
38 target: unzip
39 - - - - - - - - - - - - - - - - - -->

40 <target name="unzip" description="Unzip the file">
41 <unzip src="${basedir}/tmp/cfeclipse_nightly.zip" dest="${cfePluginFolder}" />
42 </target>
43
44 <!-- - - - - - - - - - - - - - - - - -
45 target: downloadZip
46 - - - - - - - - - - - - - - - - - -->

47 <target name="downloadZip" depends="init" description="Download the
48 zip file for ModelGlue"
>

49 <get src="${srcURL}" dest="${basedir}/tmp/cfeclipse_nightly.zip"
50 verbose="true" usetimestamp="true" />

51 </target>
52
53</project>

Comments Comments (6) | Print Print | Send Send | 4425 Views

XML Spy for Eclipse

I've been doing a lot of Xml work recently, but as i don't work with it much (except for config files) I tend to just use XML buddy for Eclipse, sometimes the eclipse xml parser from the WST, and XML spy Home edition as a standalone.

But now I've just found and been using XML Spy for eclipse. You can use it with the free and pro edition and gives you a lot more options than other free eclipse options.

Comments Comments (2) | Print Print | Send Send | 4266 Views

CFeclipse ANT nightly build

I've been getting into ANT for the last couple days and while mucking about i've created a build.xml file for the CFE nightly build. Its nothing amazing, more of a modified version of Wayne Grahams recent Model Glue build.xml.

The code for build.xml is below, to run the file from Eclipse just put the file into any directory, update line 10 with your CFEclipse folder location, right-click and then select Run As -- Ant Build.

view plain print about
1<?xml version="1.0" encoding="UTF-8"?>
2<project name="build-nightly-cfe" default="setup" basedir=".">
3 <description>
4 Download the CFE nightly build and extracts to your pluggin folder
5    </description>
6    
7    <!-- =================================
8    This includes our build.properties file
9    ================================== -->

10    <property name="cfePluginFolder" value="d:/program files/eclipse/" />
11 <property name="srcURL" value="http://www.robrohan.com/client/includes/pods/cfeclipse_nightly.zip" />
12    
13 <!-- =================================
14 target: setup
15 ================================= -->

16 <target name="setup" depends="init,downloadZip,unzip,cleanDirs"
17 description="-->Sets up your CFeclipse nightly build">

18 <tstamp/>
19 <echo message="Build fininshed at ${DSTAMP}" />
20 </target>
21
22 <!-- - - - - - - - - - - - - - - - - -
23 target: init
24 - - - - - - - - - - - - - - - - - -->

25 <target name="init" description="Build directory structure">
26 <mkdir dir="tmp"/>
27 </target>
28
29
30 <!-- - - - - - - - - - - - - - - - - -
31 target: cleanDirs
32 - - - - - - - - - - - - - - - - - -->

33 <target name="cleanDirs" description="clean up">
34     <delete dir="${basedir}/tmp" />
35 </target>
36
37 <!-- - - - - - - - - - - - - - - - - -
38 target: unzip
39 - - - - - - - - - - - - - - - - - -->

40 <target name="unzip" description="Unzip the file">
41 <unzip src="${basedir}/tmp/cfeclipse_nightly.zip" dest="${cfePluginFolder}" />
42 </target>
43
44 <!-- - - - - - - - - - - - - - - - - -
45 target: downloadZip
46 - - - - - - - - - - - - - - - - - -->

47 <target name="downloadZip" depends="init" description="Download the
48 zip file for ModelGlue"
>

49 <get src="${srcURL}" dest="${basedir}/tmp/cfeclipse_nightly.zip"
50 verbose="true" usetimestamp="true" />

51 </target>
52</project>

Comments Comments (2) | Print Print | Send Send | 3890 Views

More Entries

BlogCFC by Raymond Camden + Twitter @AndyJ + ColdFusion jobs + Contact Me + Snippets/Downloads + RSS .