filemaker PRO XML to XML for a CMS with XSL

Here should go questions about transforming XML with XSLT and FOP.
heldopslippers
Posts: 10
Joined: Thu Dec 07, 2006 12:08 pm

filemaker PRO XML to XML for a CMS with XSL

Post by heldopslippers » Thu Dec 07, 2006 1:52 pm

HI

I have a problem with XML to XML with a XSL file.

I have Filmaker PRO wich produces a XML file. I want the information in a CMS system but this does only allow his own style.

I have to make a XSL (wich I did with many research beceause I am new to XML and XSL). But doesn't work jet. I hope somoene can help me out.


this is the XML file from filemaker PRo

Code: Select all


  <?xml version="1.0" encoding="UTF-8" ?> 
- <FMPDSORESULT xmlns="http://www.filemaker.com/fmpdsoresult">
<ERRORCODE>0</ERRORCODE>
<DATABASE>XSL-Jeljer Geconverteerd 2.fp5</DATABASE>
<LAYOUT>Layout 2</LAYOUT>
- <ROW MODID="3" RECORDID="2">
<tekst>A</tekst>
<tekstvak>B</tekstvak>
</ROW>
- <ROW MODID="3" RECORDID="3">
<tekst>C</tekst>
<tekstvak>D</tekstvak>
</ROW>
- <ROW MODID="3" RECORDID="4">
<tekst>E</tekst>
<tekstvak>F</tekstvak>
</ROW>
- <ROW MODID="4" RECORDID="5">
<tekst>G</tekst>
<tekstvak>H</tekstvak>
</ROW>
- <ROW MODID="2" RECORDID="6">
<tekst>I</tekst>
<tekstvak>J</tekstvak>
</ROW>
</FMPDSORESULT>

now How I want it to be (I made this XML file with the CMS system):

Code: Select all


<?xml version="1.0" encoding="iso-8859-1"?>
<object>
<objectname>XSLT</objectname>
<properties>
<property id="94" type="textinput" required="false" searchable="false">
<name><![CDATA[tekst]]></name>
<defaultvalue><![CDATA[]]></defaultvalue>
<validation><![CDATA[text]]></validation>
</property>
<property id="95" type="textinput" required="false" searchable="false">
<name><![CDATA[tekstvak]]></name>
<defaultvalue><![CDATA[]]></defaultvalue>
<validation><![CDATA[text]]></validation>
</property>
</properties>
<data>
<item>
<field propertyid="94"><![CDATA[A]]></field>
<field propertyid="95"><![CDATA[B]]></field>
</item>
<item>
<field propertyid="94"><![CDATA[C]]></field>
<field propertyid="95"><![CDATA[D]]></field>
</item>
<item>
<field propertyid="94"><![CDATA[E]]></field>
<field propertyid="95"><![CDATA[F]]></field>
</item>
<item>
<field propertyid="94"><![CDATA[G]]></field>
<field propertyid="95"><![CDATA[H]]></field>
</item>
<item>
<field propertyid="94"><![CDATA[I]]></field>
<field propertyid="95"><![CDATA[J]]></field>
</item>
</data>
</object>


so now my XSL file (this doesn't work) :

Code: Select all


<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method='html' version='1.0' encoding='ISO-8859-1' indent='yes'/>
<xsl:template match="/FMPXMLRESULT">
<object>
<objectname>NAAM KOMEN EHMMM...... TJA</objectname>
<properties>
<xsl:for-each select="field">
<property id="position+90" type="textinput" required="false" searchable="false">
<name>sorry weet nog niet hoe ik diet te pakke moet krijgen</name>
<defaultvalue></defaultvalue>
<validation>text</validation>
</property>
</xsl:for-each>
</properties>
<data>
<xsl:for-each select="RESULTSET">
<xsl:for-each select="ROW">
<item>
<xsl:for-each select="COL">
<field propertyid="position+90">
<xsl:value-of select="."/>
</field>
</xsl:for-each>
</item>
</xsl:for-each>
</xsl:for-each>
</data>
</object>
</xsl:template>
</xsl:stylesheet>



so this is all, I hope someone can help me. I hope you can read my english ( I live in Holland) and that my code doesn't suck to much.

gr Heldopslippers