XSLT Namespace troubles -


in next step of project working on having problem namespace statements in xslt file. admit problem identical found in question: filemaker xsl importing blank fields. however, i'm not able understand solution there , feel perhaps answer may bit more simplistic, i.e. i've mucked syntax somehow.

the xml i'm working is:

    <?xml version="1.0" encoding="utf-8" ?>     <ledesxml xmlns="http://www.ledes.org/ledes20.xsd">       <firm>         <lf_vendor_id>test</lf_vendor_id>       </firm>     </ledesxml>  

the xslt i'm using is:

<?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0"      xmlns="http://www.ledes.org/ledes2000.xsd"     xmlns:t="http://www.ledes.org/ledes2000.xsd"     xmlns:xsl="http://www.w3.org/1999/xsl/transform">      <xsl:template match="/">  <fmpxmlresult xmlns="http://www.filemaker.com/fmpxmlresult">      <metadata>         <field name="lf_vendor_id" type="text"/>     </metadata>      <resultset>         <row>             <col><data><xsl:value-of select="/t:ledesxml/t:firm/t:lf_vendor_id"/></data></col>         </row>     </resultset>  </fmpxmlresult>  </xsl:template> </xsl:stylesheet> 

the import filemaker results in new record without data. xml input here industry standard , doesn't change (at least present purposes).

the use of name spaces here bit confusing , based entirely on namespaces used in question linked above. using wild card in "value-of select" statement work, might expect, grabs text in xml sample , not data in interested.

since import seems work , name space convention seems have worked poster, i'm @ bit of loss. have pointers i've gone wrong?

the xml document has xmlns="http://www.ledes.org/ledes20.xsd" while xslt declares xmlns:t="http://www.ledes.org/ledes2000.xsd" ledes2000 instead of ledes20. need use same namespace url in both documents.


Comments