Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Coldfusion XML XSLT conversion

Featured Replies

I have a huge headache.

 

I have a file SQUAD, this reads a list from the database then it saves the list to a file, then the same file reads the list from the file and uses 'XmlTransform' to join it to the XSLT and format it.

 

My problem is that the code I have used on that website simply doesn't work when I have replicated it to produce the code below, can anyone tell me any potential problems I might face using this, I have scoured the internet trying to find an answer and nothing makes any sense.

 

Your help is much appreciated!

 

<CFQUERY name="get_fixtures" datasource="*">
 SELECT Opposition, fdate, ftime, location 
 FROM fixtures
 ORDER BY fdate
</CFQUERY>

<?xml version="1.0"?>

<CFXML VARIABLE="FixtureXml">
 <upcomingFixtures>
   <CFOUTPUT query="get_fixtures">
     <fixture>
       <fdate>#fdate#</fdate>
       <opposition>#Opposition#</opposition>
       <location>
         #location#
       </location>
       <ko>#ftime#</ko>
     </fixture>
    </CFOUTPUT>
 </upcomingFixtures>
</CFXML>

<CFFILE
ACTION="WRITE"
FILE="#ExpandPath('Fixturelist.xml')#"
OUTPUT="#ToString(FixtureXml)#">



<CFSET FixturList = ExpandPath("Fixturelist.xml")>
<!--- Read XML file into string variable called MyXmlCode --->
<CFFILE
ACTION="READ"
FILE="#FixturList#"
VARIABLE="LFCFixtureList">
<!--- You also need to work with your XSLT Stylesheet code --->
<CFSET FixtureXSL = ExpandPath("fixtures.xsl")>
<!--- Read XSLT file into string variable called MyXsltCode --->
<CFFILE
ACTION="READ"
FILE="#FixtureXSL#"
VARIABLE="LFCFixtureXSL">
<!--- Perform the XSLT Stylesheet transformation --->
<CFSET XSLXMLmesh = XmlTransform(LFCFixtureList, LFCFixtureXSL)>
<!--- Return transformed XML to whatever program asked for it --->
<CFCONTENT
TYPE="text/html"
RESET="Yes"><CFOUTPUT>#XSLXMLmesh#</CFOUTPUT>

 

The file it writes to is HERE so I know the first portion works. I having problems with the latter part, if anyone knows what is happenin I would love your input.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.