View Single Post
  #1  
Old March 29th, 2018, 03:58 AM
macfan55 macfan55 is offline
Junior Community Member
 
Join Date: Apr 2011
Location: Netherlands - Emmen
Posts: 33
Unhappy error in xml file: Expected an attribute value...

Hi everyone;
I am trying to build my first xml rule to be used in FusionPro as a rule for every new job to choose. But I got stuck on the following error code:
Fatal error: Expected an attribute value; line 2, column 21

I hereby past te xml-code in this thread:

<?xml version="1.0" encoding="UTF-16" ?>
<template_rule name=“Postcode spatie” version="1.0" type="text" taggedtext="false">
<Comment language="en-US">Deze rule plaatst een spate in de postcode waar die ontbreekt.</Comment>
<Description language="en-US">Please select the appropriate values.</Description>
<Description language="de">Wählen Sie die entsprechenden Werte.</Description>
<Description language="fr">Veuillez sélectionner les valeurs appropriées.</Description>
<Description language="es">Seleccione los valores que correspondan.</Description>
<Description language="it">Selezionare i valori appropriati.</Description>
<Description language="zh-CN">请选择相应的值。</Description>
<Description language="zh-TW">請選取適當的值。</Description>
<Description language="ja">該当する値を選択してください。</Description>
<fieldlist>
<field type="FIELDLIST" required="true">
<fieldname>Var1</fieldname>
<prompt language="en-US">Kies het Postcode veld.</prompt>
<prompt language="de">Wählen Sie ein Feld für die Konvertierung in die richtige Buchstabengröße aus.</prompt>
<prompt language="fr">Choisissez un champ pour la conversion dans la casse appropriée.</prompt>
<prompt language="es">Elija un campo para convertir al estilo de mayúsculas y minúsculas deseado.</prompt>
<prompt language="it">Scegliere un campo per la conversione di maiuscole/minuscole.</prompt>
<prompt language="zh-CN">选择用于转换为适当大小写的字段。</prompt>
<prompt language="zh-TW">選擇要轉換成適當大小寫的欄位。</prompt>
<prompt language="ja">該当する大文字/小文字に変換するフィールドを選択します。</prompt>
<value></value>
</field>

<code>


if (Len(Trim(Field(Var1))) == 6)
{
x = Left(Field(Var1), 4);
y = Right(Field(Var1), 2);
return x + " " + y;
}
else if (Len(Trim(Field(Var1))) == 2)
{
return FormatNumber("00000", Field(Var1));
}
else

return Field(Var1);


</code>
</template_rule>
Reply With Quote