Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

xml syntax with CFSCRIPT

Status
Not open for further replies.

omerdurdu

Programmer
Jul 21, 2001
72
TR
I have something like this but it is giving a syntax erro can someone help me:


<cfscript>
numSrcinfo=ArrayLen(mydoc.metadata.dataqual.lineage.XmlChildren);
num=ArrayLen(mydoc.metadata.dataqual.lineage.procstep);
numLinage=numSrcinfo-num;

for(k=1;
k LTE #numLinage#;
k = k+1)
{
if (IsDefined(&quot;mydoc.metadata.dataqual.lineage.srcinfo[k].srccite.citeinfo.origin.XMLText&quot;))
Originator[k] = &quot;#mydoc.metadata.dataqual.lineage.srcinfo[k].srccite.citeinfo.origin.XMLText#&quot;;
else
&quot; &quot;;
</cfscript>


The error is:
Parameter 1 of function IsDefined, which is now &quot;mydoc.metadata.dataqual.lineage.srcinfo[k].srccite.citeinfo.origin.XMLText&quot;, must be a syntactically valid variable name.


The Error Occurred in C:\iPlanet\Servers\docs\XML\test1.cfm: line 12

10 : k LTE #numLinage#;
11 : k = k+1)
12 : {
13 : if (IsDefined(&quot;mydoc.metadata.dataqual.lineage.srcinfo[k].srccite.citeinfo.origin.XMLText&quot;))
14 : Originator[k] = &quot;#mydoc.metadata.dataqual.lineage.srcinfo[k].srccite.citeinfo.origin.XMLText#&quot;;


I am not sure what can be correct syntax here:
if (IsDefined(&quot;mydoc.metadata.dataqual.lineage.srcinfo[k].srccite.citeinfo.origin.XMLText&quot;))


 

Try

Code:
if (IsDefined(&quot;mydoc.metadata.dataqual.lineage.srcinfo[#k#].srccite.citeinfo.origin.XMLText&quot;))

also... where's your closing } for the &quot;for&quot; statement? Hope it helps,
-Carl
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top