Okay, I figured it out on my own finally. I stumbled upon the
ListToArray function, and did this:
<cfset myNameArray = ListToArray(attributeNameList, ",",
"true")>
<cfset myValueArray = ListToArray(attributeValueList, ",",
"true")>
This function allows you to count the blank spaces as array
members, which is exactly what I needed.
Then it was just a matter of looping over both arrays and
putting the values where I needed them, like this:
<cfset index=1/>
<cfloop from="1" to="#ArrayLen(myNameArray)#"
index="j">
<cfif #myValueArray
# eq ""><cfelse>
<cfset attributeNameValuePairs =
ListAppend(attributeNameValuePairs,
"Attribute.#index#.Name=#myNameArray#Attribute.#index#.Value=#myValueArray#")/>
</cfif>
<cfset index = index + 1/>
</cfloop>
This loop says that if the value array is blank, skip it,
otherwise match up the name/value pairs. When I output
attributeNameValuePairs I get the concatenated string exactly the
way I wanted. I love ColdFusion.