Highlighted

problem cf10 installation xml error - Conflicting values for output property method

New Here ,
Jul 14, 2014

Copy link to clipboard

Copied

We just completed a ColdFusion 10 installation on Windows Server 2008 R2. After taking care of some configuration issues, we're now faced with a problem that we can't figure out. Searches on Google for the error returned almost nothing.

The error occurs when xmltransform is called in a CFC file. The error we get from CF is:

An error occured while Transforming an XML document

             Failed to compile stylesheet. 1 error detected.            

It's not very helpful. In the coldfusion-error.log file, we have this entry:

Error at xsl:output on line 2 column 193

  XTSE1560: Conflicting values for output property method

Anyone have any ideas how to fix this? Is it something simple that we overlooked, or a fundamental difference in the way CF10 handles xmltransform?

Thanks,

Jamie Carter

Adobe Community Professional
Correct answer by BKBK | Adobe Community Professional

This is telling us that there is another xsl:output element defined elsewhere. Have you checked the included XSL files?

Views

1.5K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

problem cf10 installation xml error - Conflicting values for output property method

New Here ,
Jul 14, 2014

Copy link to clipboard

Copied

We just completed a ColdFusion 10 installation on Windows Server 2008 R2. After taking care of some configuration issues, we're now faced with a problem that we can't figure out. Searches on Google for the error returned almost nothing.

The error occurs when xmltransform is called in a CFC file. The error we get from CF is:

An error occured while Transforming an XML document

             Failed to compile stylesheet. 1 error detected.            

It's not very helpful. In the coldfusion-error.log file, we have this entry:

Error at xsl:output on line 2 column 193

  XTSE1560: Conflicting values for output property method

Anyone have any ideas how to fix this? Is it something simple that we overlooked, or a fundamental difference in the way CF10 handles xmltransform?

Thanks,

Jamie Carter

Adobe Community Professional
Correct answer by BKBK | Adobe Community Professional

This is telling us that there is another xsl:output element defined elsewhere. Have you checked the included XSL files?

Views

1.5K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jul 14, 2014 0
New Here ,
Jul 14, 2014

Copy link to clipboard

Copied

The issue appears to be related to this post on StackOverflow: xslt - ColdFusion - pass XML as parameter to xmlTransform() in CF10 - Stack Overflow.

I tried creating a very simple XML/XSL to transform, and used Adobe's example files. I got the output column headers in the example without an error, but did not show any data. In reviewing Adobe's example, it appears that the files have conflicting info, like they were made for two different examples. So that's not terribly helpful.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 14, 2014 0
Adobe Community Professional ,
Jul 15, 2014

Copy link to clipboard

Copied

If the issue is related to the Stackoverflow post, then you could solve it by coverting the XML and XSL to string before using them to call calling xmlTransform. Also, if you use the third parameter in the function xmlTransform, ensure that it is a structure that contains key-value pairs, the values being of simple type.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 15, 2014 0
New Here ,
Jul 15, 2014

Copy link to clipboard

Copied

Thanks very much for the suggestion. I used toString() to convert the input to string, but I'm getting the same error:

Error at xsl:output on line 2 column 193

  XTSE1560: Conflicting values for output property method

I tested the XML/XSLT functionality using example code, and it worked fine. The problem must lie somewhere else.

This is the code we're using:

        <cfset xsltFileCorrected = trim("../" & this.xsltFile)>

        <cfset xsltFileCorrected = REReplace( xsltFileCorrected, "^[^<]*", "", "all" )>

        <cfset thisXmlDom = tostring(this.xmlDom)>

        <cfset xsltFileCorrected = tostring(xsltFileCorrected)>

        <cfset this.pageOutput=xmltransform(thisxmlDom,xsltFileCorrected,parameters)>

Is there anything malformed about this code? Would it help to see a dump of the XML and XSLT input?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 15, 2014 0
New Here ,
Jul 15, 2014

Copy link to clipboard

Copied

The error is reported as line 2 column 205. The xslt output at that location is the end of this line:

<xsl:output method="html" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" media-type="application/xhtml+xml" indent="no" />

Is there are conflict there? Should the method not be HTML? The baffling thing about this is that this code works fine in the live environment, which is CF7,

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 15, 2014 0
Adobe Community Professional ,
Jul 15, 2014

Copy link to clipboard

Copied

Could you show us the XML and XSL files?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 15, 2014 0
New Here ,
Jul 15, 2014

Copy link to clipboard

Copied

I think so, there's no security risk by displaying the code, right? If there is, please let me know and I will edit the post.

Here is the XML:

<?xml version="1.0" encoding="UTF-8"?>

<page browser="" contentId="398930" dept="" deptDesc="Anne Arundel Community College" media="" name="default" template="homepage" templateDept="" title="Welcome to Anne Arundel Community College" updated="Jul  2 2014  3:28PM">

    <timetolive/>

    <urlparameter/>

    <headline>

        <primary seq="1"/>

    </headline>

    <text>

        <introduction seq="1">&lt;span class="txtSbHd"&gt;&lt;a href="https://www.aacc.edu/aboutaacc/default.cfm"&gt;About AACC&lt;/a&gt;&lt;/span&gt; &lt;p&gt;Meet our leadership, learn our vision, check out our awards and moreŠ&lt;/p&gt;<textid>886925</textid>

    </introduction>

    <introduction seq="2">&lt;br&gt;&lt;span class="txtSbHd"&gt; &lt;p&gt;&lt;a href="https://www.aacc.edu/offer/default.cfm"&gt;Ηhat We Offer&lt;/a&gt;&lt;a href="https://www.aacc.edu/offer"&gt; &lt;/a&gt;&lt;/p&gt;&lt;/span&gt; &lt;p&gt;Complete an associate degree, certificate or professional certification...&nbsp; &lt;/p&gt;<textid>886926</textid>

</introduction>

<introduction seq="3">&lt;span class="txtSbHd"&gt; &lt;br&gt;&lt;a href="/offer/learningformats.cfm"&gt;ͭͭͭͭLearning Formats&lt;/a&gt;ͦlt;/span&gt; &lt;p&gt;Take classes the way you like to learn ֠face-to-face, online, just on weekends or a combinationͮ.. &lt;/p&gt;<textid>886927</textid>

</introduction>

<introduction seq="4">&lt;span class="txtSbHd"&gt;&lt;br&gt;&lt;a href="https://www.aacc.edu/studentservices/default.cfm"&gt;ͭΓtudent Success Services&lt;/a&gt;&lt;a href="https://www.aacc.edu/studentservices/"&gt;&lt;/a&gt;&lt;/span&gt; &lt;p&gt;Let us help you reach your goals, choose the right courses, find child care, set up tutoring...͠&lt;/p&gt;<textid>886928</textid>

</introduction>

<introduction seq="5">&lt;span class="txtSbHd"&gt;&lt;br&gt;&lt;a href="https://www.aacc.edu/events/default.cfm"&gt;ͭ΁ACC Events&lt;/a&gt;&lt;a href="https://www.aacc.edu/events/"&gt;&lt;/a&gt;&lt;/span&gt; &lt;p&gt;Something is always happening. Check out our sporting events, performances, concerts and moreŦamp;nbsp;͠&lt;/p&gt;<textid>886929</textid>

</introduction>

<introduction seq="7">ͦlt;a title="Register now at AACC!" href="http://www.aacc.edu/getstarted/default.cfm"&gt;Get Started at͠AACC&lt;/a&gt;<textid>886931</textid>

</introduction>

<introduction seq="8">ͦlt;a title="Search for all credit and noncredit courses at AACC!" href="https://www.aacc.edu/search/course/default.cfm"&gt;ͭͭγearch for coursesͦlt;/a&gt;<textid>886932</textid>

</introduction>

<introduction seq="9">ͦlt;a title="Learn more about student orientation!" href="https://www.aacc.edu/orientation/default.cfm"&gt;New Student Orientationͦlt;/a&gt;ͼtextid>886933</textid>

</introduction>

<introduction seq="10">&lt;a title="Learn online at AACC!" href="https://www.aacc.edu/virtualcampus/default.cfm"&gt;online learning&lt;/a&gt;ͼtextid>886934</textid>

</introduction>

<introduction seq="11">&lt;a title="Learn how you can support AACC!" href="https://www.aacc.edu/foundation/default.cfm"&gt;support aacc&lt;/a&gt; &lt;br&gt;ͼtextid>886935</textid>

</introduction>

<form seq="6">&lt;p&gt;&lt;a href="https://www.aacc.edu/advising/file/GroupAdvisingFlyerAugust2011.pdf"&gt;&gt;&gt; New Student Group Advising for August&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="https://www.aacc.edu/cdc"&gt;&gt;&gt; Take a class while the Child Development Center (CDC) watches your child. Enroll now for the fall semester!&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="https://www.aacc.edu/legalstudies/cle/"&gt;&gt;&gt; AACC's Legal Studies Institute offers courses for attorneys, mediators, paralegals and legal professionals. Learn more! &lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="https://www.aacc.edu/aboutaacc/MHECresolution.cfm"&gt;&gt;&gt; MHEC Resolution authorizes Maryland community colleges, by name, to operate in the state of Maryland...&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="https://www.aacc.edu/stayinformed"&gt;&gt;&gt; Manage AACC e2campus Update Alerts to Your E-mail or Phone&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="https://www.aacc.edu/comingsoon"&gt;&gt;&gt; One-Day Personal Enrichment Upcoming Courses!&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="https://www.aacc.edu/recreg/waystoregister.cfm"&gt;&gt;&gt; How to Register for Credit Courses at AACC&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="https://www.aacc.edu/noncredit/"&gt;&gt;&gt; How to Register for Noncredit Courses at AACC&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="https://www.aacc.edu/newsonline/2011/08/release1221.cfm"&gt;&gt;&gt; AACC Named One of the Best Colleges in the Nation to Work for by The Chronicle of Higher Education&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="https://www.aacc.edu/studentlife/housing.cfm"&gt;&gt;&gt; Looking for housing or have housing for rent? Check out Student Life's list of housing resources free for students, faculty/staff, and the community.&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="https://www.aacc.edu/collegecalendar"&gt;&gt;&gt; 2011-2012 Academic Calendar&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="https://www.aacc.edu/newsonline/2011/07/release1216.cfm"&gt;&gt;&gt; Fall Job Fair-10/27 from noon-4 p.m. in GYM. Open to the college community, employers, and job hunters! For employer booth information and to register, call 410-777-2770...&lt;/a&gt;&lt;/p&gt;<textid>886930</textid>

</form>

</text>

<image>

<small seq="1">

<imgId>133836</imgId>

<imgFile>RegisterReminderHomePage2014Fall.jpg</imgFile>

<imgAlt>Register for classes today!</imgAlt>

<linkId>246346</linkId>

<linkUrl>/register</linkUrl>

</small>

<small seq="2">

<imgId>133561</imgId>

<imgFile>CareerCoachHomePageTile230x240.jpg</imgFile>

<imgAlt>AACC Career Coach</imgAlt>

<linkId>246347</linkId>

<linkUrl>/careercoach</linkUrl>

</small>

<small seq="3">

<imgId>131433</imgId>

<imgFile>weekend2302.jpg</imgFile>

<imgAlt>Weekend Courses at AACC</imgAlt>

<imgCaption>WEEKENDYOU at AACC</imgCaption>

<linkId>246348</linkId>

<linkUrl>/weekend/default.cfm</linkUrl>

</small>

<small seq="4">

<imgId>131430</imgId>

<imgFile>ss2020.png</imgFile>

<imgAlt>Student Success 2020</imgAlt>

<linkId>246349</linkId>

<linkUrl>/studentsuccess2020/default.cfm</linkUrl>

</small>

<medium seq="5"/>

<medium seq="6">

<imgId>131948</imgId>

<imgFile>atd-215.png</imgFile>

<linkId>246350</linkId>

<linkUrl>/atd</linkUrl>

</medium>

<medium seq="7"/>

</image>

</page>

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 15, 2014 0
New Here ,
Jul 15, 2014

Copy link to clipboard

Copied

Here is the XSLT:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml">

<xsl:output method="html" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" media-type="application/xhtml+xml" />

<xsl:include href="E:\Inetpub\wwwroot\cfroot\cms\aacc-cms\general\xslt\aacc_main_browse.xsl" />

<xsl:include href="E:\Inetpub\wwwroot\cfroot\cms\aacc-cms\general\xslt\rotator\aacc_home_rotator.xsl" />

<xsl:include href="E:\Inetpub\wwwroot\cfroot\cms\aacc-cms\general\xslt\nav\aacc_home_side_menu.xsl" />

<xsl:include href="E:\Inetpub\wwwroot\cfroot\cms\aacc-cms\general\xslt\news\aacc_home_news.xsl" />

<xsl:template match="page">

  <!-- homepage --> 

        <div class="home_rotator_nav_div">

          <div class="nav" id="nav"><xsl:comment>nav div</xsl:comment></div>

        </div>

      

        <div id="home_rotator_container">

          <xsl:call-template name="home_side_menu" />

        

            <xsl:choose>

              <xsl:when test="string-length(text/child::*[attribute::seq=12])=0" >

                <xsl:comment>emergency alert not active</xsl:comment>

              </xsl:when>

              <xsl:otherwise>

                <div id="emergency">

                <div id="emergencyClose">

                  <a onclick="document.getElementById('emergency').style.display='none';">

                    close <img src="/aacc-cms/general/images/icons/controls/close.png" />

                    </a>

                  </div>

                  <div id="emergencyHeader"><h1>AACC Alert</h1></div>

                  <xsl:apply-templates select="text/child::*[attribute::seq=12]" />

                  <br /><br />

                </div>

              </xsl:otherwise>

            </xsl:choose>

        

          <div class="home_rotator_img">

                <xsl:call-template name="aacc_home_rotator" /><xsl:comment>rotator</xsl:comment>

          </div>

        

        </div>

  <div id="body_container_top_bg"><div id="body_container_bottom_bg"><div id="homepage_body_container">

    

        <div class="bottom_center_home">

          <div id="bottom_center_content">

        

            <xsl:if test="string-length(image/child::*[attribute::seq=1]/imgFile)>0" >

              <div id="homepage_ad_1a">

                <xsl:apply-templates select="image/child::*[attribute::seq=1]" />

              </div>

            </xsl:if>

                    

            <div id="homepage_ad_1b">

              <xsl:comment>bottom ad</xsl:comment>

              <a href="#"><xsl:apply-templates select="image/child::*[attribute::seq=2]" /></a>

            </div>

      

          </div>

        </div>

      

       <div id='e2campus' style="visibility:hidden;"> <script type="text/javascript" src="http://widgets.omnilert.net/f300fe3c5dccfdb6d076ecb0048934fa-1791">//</script> </div><!--E2campus smart code-->

      

        <div id="body_bottom_left_home">

      

          <div id="body_bottom_right_home">

            <h2>AACC Highlights </h2>

            <div class="highlights">

              <div class="highlights_title">

                <xsl:if test="string-length(text/child::*[attribute::seq=7])>0" >

                  <div id="tertiary_1_txt1" ><xsl:apply-templates select="text/child::*[attribute::seq=7]" /><img src="/aacc-cms/general/image/cleardiv.png" /></div>

                </xsl:if>

              </div>

            </div>

          

            <div class="highlights">

              <div class="highlights_title">

                <xsl:if test="string-length(text/child::*[attribute::seq=8])>0" >

                  <div id="tertiary_1_txt2" ><xsl:apply-templates select="text/child::*[attribute::seq=8]" /><img src="/aacc-cms/general/image/cleardiv.png" /></div>

                </xsl:if>

              </div>

            </div>

          

            <div class="highlights">

              <div class="highlights_title">

                <xsl:if test="string-length(text/child::*[attribute::seq=9])>0" >

                  <div id="tertiary_1_txt3" ><xsl:apply-templates select="text/child::*[attribute::seq=9]" /><img src="/aacc-cms/general/image/cleardiv.png" /></div>

                </xsl:if>

              </div>

            </div>

          

            <div class="highlights">

              <div class="highlights_title">

                <xsl:if test="string-length(text/child::*[attribute::seq=10])>0" >

                  <div id="tertiary_1_txt4" ><xsl:apply-templates select="text/child::*[attribute::seq=10]" /><img src="/aacc-cms/general/image/cleardiv.png" /></div>

                </xsl:if>

              </div>

            </div>

          

            <div class="highlights">

              <div class="highlights_title">

                <xsl:if test="string-length(text/child::*[attribute::seq=11])>0" >

                  <div id="tertiary_1_txt5" ><xsl:apply-templates select="text/child::*[attribute::seq=11]" /><img src="/aacc-cms/general/image/cleardiv.png" /></div>

                </xsl:if>

              </div>

            </div>

          

            <xsl:if test="string-length(image/child::*[attribute::seq=3]/imgFile)>0" >

              <div class="highlights_last">

                <div class="highlights_last_title">

                  <xsl:apply-templates select="image/child::*[attribute::seq=3]" />

                </div>

              </div>

            </xsl:if>

            <xsl:if test="string-length(image/child::*[attribute::seq=4]/imgFile)>0" >

              <div class="highlights_last">

                <div class="highlights_last_title">

                  <xsl:apply-templates select="image/child::*[attribute::seq=4]" />

                </div>

              </div>

            </xsl:if>

            <xsl:if test="string-length(image/child::*[attribute::seq=5]/imgFile)>0" >

              <div class="highlights_last">

                <div class="highlights_last_title">

                  <xsl:apply-templates select="image/child::*[attribute::seq=5]" />

                </div>

              </div>

            </xsl:if>

            <xsl:if test="string-length(image/child::*[attribute::seq=6]/imgFile)>0" >

              <div class="highlights_last">

                <div class="highlights_last_title">

                  <xsl:apply-templates select="image/child::*[attribute::seq=6]" />

                </div>

              </div>

            </xsl:if>

            <xsl:if test="string-length(image/child::*[attribute::seq=7]/imgFile)>0" >

              <div class="highlights_last">

                <div class="highlights_last_title">

                  <xsl:apply-templates select="image/child::*[attribute::seq=7]" />

                </div>

              </div>

            </xsl:if>

          

          </div>

          <div class="bottom_left_home">

        

            <h2 style="font-size:16px; font-weight:bold;"><a href="/newsroom" style="color:#ffffff;">AACC Newsroom</a></h2>

            <div id="home_news_content">

              <!--<div class="homepage_news_item" style="color:#ff0000;">

                 <div class="homepage_news_headline">

                  <h3>Password Management Tool Unavailable 3/7-3/8</h3>

                </div>

                <div class="homepage_news_preview">

                  As part of the Friday scheduled system downtime which starts at 9:30 p.m., we will be upgrading the password management tool on March 7th. Due to the nature of this upgrade, we anticipate the password management tool to be unavailable until 3:30 p.m. on Sat., March 8th. During this time, you will not be able to reset your password. We will provide updates here on the AACC website and the portal.

                </div>

              </div> -->

              <div id="news_articles" class="news_articles">

              Loading newsroom feed...

                <img src="/aacc-cms/general/image/cleardiv.png" />

              </div>

            </div>

          

          </div>

        </div>

      </div>

  

    </div>

  

  </div>

</xsl:template>

<xsl:template match="image/child::*[attribute::seq &lt; 3]" ><xsl:call-template name="genImg" /><br /></xsl:template>

<xsl:template match="image/child::*[attribute::seq &gt; 2]" ><xsl:call-template name="genImg" /></xsl:template>

</xsl:stylesheet>

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 15, 2014 0
Adobe Community Professional ,
Jul 15, 2014

Copy link to clipboard

Copied

You could have sent the files through the forum's private-mail system. If you have privacy concerns, delete them. In any case, I have them now.

I replaced <textid> and </textid> in the XML content with &lt;textid&gt; and &lt;/textid&gt;, respectively. I then saved the files as test.xml and test.xsl. When I ran the following code, there were no problems:

<cffile action="read" file="#expandpath('test.xml')#" variable="xmlFile">

<cffile action="read" file="#expandpath('test.xsl')#" variable="xslFile">

<cfset testOutput=xmlTransform(xmlFile,xslFile)>

<cfdump var="#testOutput#">

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 15, 2014 0
New Here ,
Jul 15, 2014

Copy link to clipboard

Copied

Thanks for doing this. I tried your suggestion and I got the same error. Then I replaced all the < and > and it still failed. Could it be related to the included XSL files?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 15, 2014 0
New Here ,
Jul 15, 2014

Copy link to clipboard

Copied

Acutally, probably not. I stripped out the includes and got the same error. It doesn't seem to matter what I do, it keeps throwing that error.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 15, 2014 0
Adobe Community Professional ,
Jul 15, 2014

Copy link to clipboard

Copied

Check: I am on Coldfusion 11. I am now going to test it in Coldfusion 10.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 15, 2014 0
Adobe Community Professional ,
Jul 15, 2014

Copy link to clipboard

Copied

The test code also works on Coldfusion 10.0.13.287689. So, assuming you made the same replacements I did, the only difference between your code and mine is that you call xmlTransform with 3 parameters. What do you get when you call it with 2 parameters?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 15, 2014 0
New Here ,
Jul 15, 2014

Copy link to clipboard

Copied

I get the same result. I tried it with the actual site code, and then tried it with this code:

<cffile action="read" file="#expandpath('test2.xml')#" variable="xmlFile">

<cffile action="read" file="#expandpath('test2.xsl')#" variable="xslFile">

<cfset testOutput=xmlTransform(xmlFile,xslFile)>

<cfdump var="#testOutput#">

An error occured while Transforming an XML document.            

             Failed to compile stylesheet. 1 error detected.            

The error occurred in E:/Inetpub/wwwroot/cfroot/cms/debug/default.cfm: line 23

21 : <cffile action="read" file="#expandpath('test2.xml')#" variable="xmlFile">

22 : <cffile action="read" file="#expandpath('test2.xsl')#" variable="xslFile">

23 : <cfset testOutput=xmlTransform(xmlFile,xslFile)>

24 : <cfdump var="#testOutput#">

25 :

Same result, both times.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 15, 2014 0
New Here ,
Jul 15, 2014

Copy link to clipboard

Copied

This is interesting, when I ran the code in CF7, I got a different error:

An error occured while Transforming an XML document. Reference is not allowed in prolog. <br>The error occurred on line 12.

Line 12 is <cfset testOutput=xmlTransform(xmlFile,xslFile)>.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 15, 2014 0
Adobe Community Professional ,
Jul 15, 2014

Copy link to clipboard

Copied

doggonemess wrote:

I get the same result. I tried it with the actual site code, and then tried it with this code:

<cffile action="read" file="#expandpath('test2.xml')#" variable="xmlFile">

<cffile action="read" file="#expandpath('test2.xsl')#" variable="xslFile">

<cfset testOutput=xmlTransform(xmlFile,xslFile)>

<cfdump var="#testOutput#">

Is the "actual site code" the same as above? You should try it with the XML and XSL files you posted above, doing the suggested replacement, so that we can compare notes.

It appears that the difference between our setups is local. Therefore I also wondered whether it would help to use relative URLs for the included XSL files, as follows:

<xsl:include href="../aacc-cms/general/xslt/aacc_main_browse.xsl" />

<xsl:include href="../aacc-cms/general/xslt/rotator/aacc_home_rotator.xsl" />

<xsl:include href="../aacc-cms/general/xslt/nav/aacc_home_side_menu.xsl" />

<xsl:include href="../aacc-cms/general/xslt/news/aacc_home_news.xsl" />

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 15, 2014 0
New Here ,
Jul 16, 2014

Copy link to clipboard

Copied

By "actual code" I mean the CFC based code that we use on the website. The code above that you made I copied to my site and tried it out in the dev environment, and I still get the error.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 16, 2014 0
Adobe Community Professional ,
Jul 16, 2014

Copy link to clipboard

Copied

Ah, I understand. Thanks for explaining.

What about testing it in a CFM page, rather than in a CFC? Just for the purposes of elimination?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 16, 2014 0
Adobe Community Professional ,
Jul 16, 2014

Copy link to clipboard

Copied

Oh, and the effect of changing the included links to relative URLs?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 16, 2014 0
New Here ,
Jul 16, 2014

Copy link to clipboard

Copied

Okay, just tried with relative URLs. I did not get any new errors. But it didn't fix the problem. The test I'm running is directly from a CFM. Let me provide the code below. I'll also provide the code for my generic test xml and xsl. This is the code I got from Adobe, and it actually does work. It makes me wonder what could be different between them. It sure looks the same to me, albeit my code is more involved.

test.cfm:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>debugging</title>

</head>

<body>

<cfoutput>

CGI.script_name: #cgi.script_name#<br />

CGI.PATH_TRANSLATED: #cgi.PATH_TRANSLATED#<br />

CGI.PATH_INFO: #cgi.PATH_INFO#

</cfoutput>

<br /><br />

<cfset structName = StructNew()>

<cffile action="read" file="E:\Inetpub\wwwroot\cfroot\cms\debug\test.xsl" variable="xmltrans">

<cfset xmldoc = XmlParse("E:\Inetpub\wwwroot\cfroot\cms\debug\test.xml")>

<cfoutput>#XmlTransform(xmldoc, xmltrans, structName)#</cfoutput>

<cffile action="read" file="#expandpath('test2.xml')#" variable="xmlFile">

<cffile action="read" file="#expandpath('test2.xsl')#" variable="xslFile">

<cfset xmlFile = toString(xmlFile)>

<cfset xmlFile = trim(xmlFile)>

<cfset xmlFile = REReplace( xmlFile, "^[^<]*", "", "all" ) />

<cfset testOutput=xmlTransform(xmlFile,xslFile)>

<cfdump var="#testOutput#">

</body>

</html>

test.xsl:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output method="html" doctype-public="-//W3C//DTD HTML 4.0 Transitional//EN" />

    <xsl:template match="/">

        <html>

            <body>

                <table border="2" bgcolor="#eeeeff">

                    <tr>

                        <th>Name</th>

                        <th>Price</th>

                    </tr>

                    <xsl:for-each select="order/items/item">

                        <tr>

                            <td>

                                <xsl:value-of select="name"/>

                            </td>

                            <td>

                                <xsl:value-of select="unitprice"/>

                            </td>

                        </tr>

                    </xsl:for-each>

                </table>

            </body>

        </html>

    </xsl:template>

</xsl:stylesheet>

test.xml:

<?xml version="1.0" encoding="UTF-8"?>

<order id="4323251">

    <customer firstname="Philip" lastname="Cramer" accountNum="21"/>

    <items>

        <item id="43">

            <name>Deluxe Carpenter&apos;s Hammer</name>

            <quantity>1</quantity>

            <unitprice>15.95</unitprice>

        </item>

        <item id="54">

            <name>36&quot; Plastic Rake</name>

            <quantity>2</quantity>

            <unitprice>6.95</unitprice>

        </item>

        <item id="68">

            <name>Standard paint thinner</name>

            <quantity>3</quantity>

            <unitprice>8.95</unitprice>

        </item>

    </items>

</order>

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 16, 2014 0
New Here ,
Jul 16, 2014

Copy link to clipboard

Copied

I also went in to the XML test2.xml and replaced all instances of <br> with <br />, tried standardizing all the < > &lt; &gt; and &gt; characters to one method, and it still produces the same error. When I strip the xsl:output tag, I do get a bunch of HTML, but it's missing the actual content that should be supplied to the fields. It's really weird.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 16, 2014 0
Adobe Community Professional ,
Jul 16, 2014

Copy link to clipboard

Copied

When I strip the xsl:output tag, I do get a bunch of HTML, but it's missing the actual content that should be supplied to the fields

A hopeful result. Just might be that tags weren't displayed.

Check out the page's source in the browser. Does it have the actual content?

In any case, it got me wondering whether there is a problem with the xsl:output element. What happens when you use just

<xsl:output method="html" encoding="UTF-8"/>

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 16, 2014 0
New Here ,
Jul 16, 2014

Copy link to clipboard

Copied

Sorry, no dice. Good thought, though. I had a feeling that might produce a different result, but nope, more of the same.

Error at xsl:output on line 2 column 45

  XTSE1560: Conflicting values for output property method

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 16, 2014 0
Adobe Community Professional ,
Jul 17, 2014

Copy link to clipboard

Copied

This is telling us that there is another xsl:output element defined elsewhere. Have you checked the included XSL files?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 17, 2014 0
New Here ,
Jul 17, 2014

Copy link to clipboard

Copied

I did - and just in case, I tried removing all the included templates, and it still failed. I'm going to try another "barebones" method. I'm going to create a simple XSL file to translate the XML and make sure that it works. Then I'll add each element from my actual XSL until it fails.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 17, 2014 0
New Here ,
Jul 17, 2014

Copy link to clipboard

Copied

Well, I feel like a big, big dummy. I found it. The output method for aacc_main_browse.xsl is "XHTML". So of course it failed, every time that file was included. FACEPALM. I wonder why it works on our current setup?

With that fixed, I am having another problem, with ColdFusion reporting "content not allowed in prolog" line 1 column 1. Could there be hidden characters or something like that?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 17, 2014 0
Adobe Community Professional ,
Jul 17, 2014

Copy link to clipboard

Copied

I have modified my post, because it crossed yours on the wire. Congratulations on findng the gremlin!

The current error says indeed that there is a character before the XML declaration. Which document does the error message refer to?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 17, 2014 0
New Here ,
Jul 17, 2014

Copy link to clipboard

Copied

I fixed that as well. Now I'm getting "An error occured while Transforming an XML document." There is nothing in the log file indicated what happened. It has the same message, with no detail. Apparently, CF thought that we were getting too close to fixing this, so it decided to make things harder.

And by the way Adobe (or Oracle), you misspelled OCCURRED.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 17, 2014 0