> Hi Dave, I appreciate your notes. Please see my comments below.
>
> Don
>
> >> I've just installed CFX_XSLT, the example file ran fine.
> >> However, test calling an XSL tranformation file, got an
> >> error, "javax.xml.transform.TransformerConfigurationException:
> >> javax.xml.transform.TransformerException:
> >> org.xml.sax.SAXParseException: Document root element
> >> is missing.
> >
> >This might be a stupid question, but are you sure your XSL file and your
> >original XML file are both well-formed?
> Even if they are not, the parser should be good enough to parse what it can and ignore with notes of what it can't. Same as when we write a program we need to add data validation element. Reasonable?
> Besides, in this case, the XSL files are not up to me whether they are well-formed or not.
No, XSL has to have well formed XML input.
> >
> >> My env: Windows XP machine with CF6.0.
> >
> >Is there a reason you can't just use the built-in XSLT functionality of CFMX
> >6.0? I think the function name in question is XMLTransform.
> Thank for the great info. I haven't looked at / familarize myself with these new tags. Funny, when I viewed sample for the XMLtransform tag, I got an another MM error (they guys don't seem to give a sh?? these days or is it just me?) URL, http://examples.macromedia.com/coldfusion/xmltransform/?
Here is an example:
input xml:
<?xml version="1.0" encoding="UTF-8"?>
<root>
<test>hi there</test>
</root>
input xslt:
<?xml version="1.0" encoding="utf-8"?>
<!--
Author:
File:
Date:
Purpose:
-->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" indent="yes" encoding="UTF-8"/>
<xsl:template match="/">
<b><xsl:value-of select="/root/test" /></b>
</xsl:template>
</xsl:stylesheet>
When all is done you should be left with:
<b>hi there</b>
--
Vale,
Rob
Luxuria immodica insaniam creat.
Sanam formam viatae conservate!
http://www.rohanclan.com
http://treebeard.sourceforge.net
http://ashpool.sourceforge.net
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

