Hello Everyone, I have a field which contains table and column name together for Foreignkey using (,) and (#) seperators. I have created also List on this field already, now i am not understanding how I can make another list for getting those values.
Now my result XML is looking like :
bnr:table > element is getting all the table and column names now, but i want to see my XML as follows:
A partial coding of my XML template is as follows:
<bnr:MD_DataSchema>
Â
{Â
let $n := xs:integer(fme:get-attribute("_element_count")) - 1Â
for $i in (0 to $n)Â
Â
let $aname := "_list_name{"||$i||"}.Spalte"Â
let $atype := "_list_name{"||$i||"}.Datentyp"Â
let $descrip := "_list_name{"||$i||"}.Beschreibung"Â
let $fkey := "_list_name{"||$i||"}.Tabellenbeziehung"Â
let $mval := "_list_name{"||$i||"}.Fehlende_Werte"Â
Â
returnÂ
{Â
if (not(fme:get-attribute($aname) eq "")) thenÂ
<bnr:column>Â
<bnr:MD_Column>Â
<bnr:tableName>Â
<gco:CharacterString>v140_mun.dbo.{fme:get-attribute("Tabelle")}</gco:CharacterString>Â
</bnr:tableName>Â
Â
<bnr:name>Â
Â
<gco:CharacterString>{fme:get-attribute($aname)}</gco:CharacterString>Â
</bnr:name>Â
{Â
if (not(fme:get-attribute($descrip) eq "")) thenÂ
<bnr:description>Â
<gco:CharacterString>{fme:get-attribute($descrip)}</gco:CharacterString>Â
Â
</bnr:description>Â
else(<bnr:description>Â
<gco:CharacterString>No description</gco:CharacterString>Â
Â
</bnr:description>Â
)Â
Â
}Â
<bnr:dataType>Â
<gco:CharacterString>{fme:get-attribute($atype)}</gco:CharacterString>Â
</bnr:dataType>Â
{Â
if (not(fme:get-attribute($mval) eq "")) thenÂ
<bnr:missingValue>Â
<gco:CharacterString>{fme:get-attribute($mval)}</gco:CharacterString>Â
</bnr:missingValue>Â
else(<bnr:missingValue>Â
<gco:CharacterString>No Missing Value</gco:CharacterString>Â
</bnr:missingValue>Â
)Â
}Â
{Â
if (not(fme:get-attribute($fkey)eq "")) thenÂ
Â
<bnr:foreignKey>Â
<bnr:MD_ForeignKey>Â
<bnr:identifier>Â
<gmd:MD_Identifier>Â
<gmd:code>Â
<gco:CharacterString></gco:CharacterString>Â
</gmd:code>Â
</gmd:MD_Identifier>Â
</bnr:identifier>Â
Â
Â
<bnr:table>Â
<gco:CharacterString>{fme:get-attribute($fkey)}</gco:CharacterString>Â
</bnr:table>Â
Â
Â
<bnr:column>Â
<gco:CharacterString></gco:CharacterString>Â
</bnr:column>Â
</bnr:MD_ForeignKey>Â
</bnr:foreignKey>Â
else ()Â
}Â
</bnr:MD_Column>Â
</bnr:column>Â
Â
else ()Â
}Â
}