animation_master Posted June 5, 2006 Posted June 5, 2006 I have an XSL document that transforms my XML document just fine -- except in FileMaker 8. The whole process works fine in TestXSLT, but... FM accepts both documents, offers to map the Results to the proper Field that exists in the database, returns no errors, reports that it has added one Record, etc. But after all is said and done, the new Record has no data in the Field. There is a whole lot of nesting in the XML, so I declare exactly the element I need by using the //ElementName XPath function. Here is a snippet. 0 0 The field DataSource should contain the attribute of the node DataSource, but it contains nothing. Any ideas?
Martin Brändle Posted June 5, 2006 Posted June 5, 2006 the //DataSource XPath selects all DataSource elements and their descendants, but not their attribute values. E.g. if you have something like this: then must return an empty string. I assume, however, that your data structure is rather like this: Then the following XPath should work to extract the attribute values: Hence, it seems, that FM8 did interpret the XSLT correctly, but TestXSLT not.
animation_master Posted June 5, 2006 Author Posted June 5, 2006 That works, but it returns every value at that level. I want all levels. I have an XML file of the form: 0001 0121 0152 0032 0444 The output I want is 0001 0121 0152 0032 0444 I can't find a way to do that without specifying one node at a time.
Martin Brändle Posted June 6, 2006 Posted June 6, 2006 Now, what do you really want? The attribute values or the element values (check your first post, there you said attribute in the last sentence)? I think we have to solve that problem with an xsl:for-each : This should add a linefeed after each value.
Recommended Posts
This topic is 6744 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now