AnsweredAssumed Answered

Some help with an XSLT

Question asked by jrenfrew Expert on Nov 30, 2017
Latest reply on Dec 4, 2017 by jrenfrew

May I prevail on one of you with the knowledge to troubleshoot an XSLT on which I am close but not anywhere near a prize. (field attached for the willing)


In general XML returned from an fmi/xml/resultset url and I am struggling to get just the value of one data node back as XML - as it contains XML


xml is in form

<fmresultset xmlns="" version="1.0">

    <error code="0"/>

    <product build="10/27/2016" name="FileMaker Web Publishing Engine" version=""/>

    <datasource database="zs5" date-format="MM/dd/yyyy" layout="Uploads" table="Uploads" time-format="HH:mm:ss" timestamp-format="MM/dd/yyyy HH:mm:ss" total-count="4"/>


        <field-definition auto-enter="no" four-digit-year="no" global="no" max-repeat="1" name="flagField" not-empty="no" numeric-only="no" result="text" time-of-day="no" type="normal"/>

        <field-definition auto-enter="no" four-digit-year="no" global="no" max-repeat="1" name="type" not-empty="no" numeric-only="no" result="text" time-of-day="no" type="normal"/>

        <field-definition auto-enter="yes" four-digit-year="no" global="no" max-repeat="1" name="xml" not-empty="no" numeric-only="no" result="text" time-of-day="no" type="normal"/>


    <resultset count="1" fetch-size="1">

        <record mod-id="16" record-id="13">

            <field name="flagField">



            <field name="type">



            <field name="xml">


                    <Company>pseud0xml here</Company>








xml is


<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl=""
    exclude-result-prefixes="xs fmrs"
<xsl:output method="xml" encoding="UTF-8" indent="yes" />
<xsl:strip-space elements="*"/>
<xsl:template match="fmrs:fmresultset/fmrs:resultset/fmrs:record[1]/fmrs:field[3]/fmrs:data">
<xsl:copy-of select="node()" />



but is returning


<?xml version="1.0" encoding="UTF-8"?>555Invoice

<Company xmlns="">

rest or xml...



As you can see I am getting the correct node returned, but also the text contained in the first two fields - which in not desired


and part two:

It is possible to return just <Company> as the root node??