Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About rshapland

  • Rank

Profile Information

  • Gender
  • Location
    East Sussex, United Kingdom

Contact Methods

  • Skype
  1. rshapland

    Importing XML with XSL - multiple parents

    That worked a treat, thank you for your help, you've often provided answers on here that have helped me in the past too - just to let you that we appreciate what you do! Cheers R
  2. rshapland

    Importing XML with XSL - multiple parents

    Thanks for responding, I tried that (and <xsl:for-each select="/object_desc/main_desc | /object_desc/iptc | /object_desc/extended_desc"> ) and get multiple rows for each file (object_desc), is there a way of stuffing 'main_desc', 'iptc', 'extended_desc' and 'keywords' all in to a single record? I've found similar requests by googling but have still not seen a solution except by going back to the XML file Cheers R
  3. Hello, I'd be very grateful for a pointer on this, I'm new to XML and have to import files as supplied: <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <object_desc> <main_desc> <ident>63859</ident> <modificationdate>14/10/2011</modificationdate> ... <remark>This is a test</remark> <title>Property tile</title> </main_desc> <iptc> <bylinetitle></bylinetitle> <captionwriter></captionwriter> ... <modifieddate></modifieddate> <source></source> </iptc> <extended_desc> <date_amended></date_amended> <library_id>177</library_id> ... <filed_under>Masters Box</filed_under> <id_objet>Object</id_objet> </extended_desc> <keywords>HighResRestricted | permission required | Cheshire</keywords> </object_desc> Each file contains a single record but the data has been split into 'main_desc', 'iptc', 'extended_desc' and oddly 'keywords' just in the root. I have created an xsl file as: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" version="1.0" encoding="utf-8" indent="yes"/> <xsl:template match="/"> <FMPXMLRESULT xmlns="http://www.filemaker.com/fmpxmlresult"> <ERRORCODE>0</ERRORCODE> <PRODUCT BUILD="" NAME="" VERSION=""/> <DATABASE DATEFORMAT="" LAYOUT="" NAME="" RECORDS="" TIMEFORMAT=""/> <METADATA> <FIELD NAME="ident" TYPE="TEXT" EMPTYOK="YES" MAXREPEAT=""/> <FIELD NAME="modificationdate" TYPE="TEXT" EMPTYOK="YES" MAXREPEAT=""/> <FIELD NAME="remark" TYPE="TEXT" EMPTYOK="YES" MAXREPEAT=""/> <FIELD NAME="title" TYPE="TEXT" EMPTYOK="YES" MAXREPEAT=""/> <FIELD NAME="bylinetitle" TYPE="TEXT" EMPTYOK="YES" MAXREPEAT=""/> <FIELD NAME="captionwriter" TYPE="TEXT" EMPTYOK="YES" MAXREPEAT=""/> <FIELD NAME="modifieddate" TYPE="TEXT" EMPTYOK="YES" MAXREPEAT=""/> <FIELD NAME="source" TYPE="TEXT" EMPTYOK="YES" MAXREPEAT=""/> <FIELD NAME="date_amended" TYPE="TEXT" EMPTYOK="YES" MAXREPEAT=""/> <FIELD NAME="library_id" TYPE="TEXT" EMPTYOK="YES" MAXREPEAT=""/> <FIELD NAME="filed_under" TYPE="TEXT" EMPTYOK="YES" MAXREPEAT=""/> <FIELD NAME="id_objet" TYPE="TEXT" EMPTYOK="YES" MAXREPEAT=""/> <FIELD NAME="keywords" TYPE="TEXT" EMPTYOK="YES" MAXREPEAT=""/> </METADATA> <RESULTSET FOUND=""> <xsl:for-each select="/object_desc/main_desc"> <ROW MODID="" RECORDID=""> <COL><DATA><xsl:value-of select="ident"/></DATA></COL> <COL><DATA><xsl:value-of select="modificationdate"/></DATA></COL> <COL><DATA><xsl:value-of select="remark"/></DATA></COL> <COL><DATA><xsl:value-of select="title"/></DATA></COL> <COL><DATA><xsl:value-of select="bylinetitle"/></DATA></COL> <COL><DATA><xsl:value-of select="captionwriter"/></DATA></COL> <COL><DATA><xsl:value-of select="modifieddate"/></DATA></COL> <COL><DATA><xsl:value-of select="source"/></DATA></COL> <COL><DATA><xsl:value-of select="date_amended"/></DATA></COL> <COL><DATA><xsl:value-of select="library_id"/></DATA></COL> <COL><DATA><xsl:value-of select="filed_under"/></DATA></COL> <COL><DATA><xsl:value-of select="id_objet"/></DATA></COL> <COL><DATA><xsl:value-of select="keywords"/></DATA></COL> </ROW> </xsl:for-each> </RESULTSET> </FMPXMLRESULT> </xsl:template> </xsl:stylesheet> But can only find a way for getting one section of the data in with '<xsl:for-each select="/object_desc/main_desc">' - is there a way to solve this with the XSL file? Many thanks for taking the time to read this. R
  4. Thanks chaps, That worked a dream, if you ever find yourself in the Lord Raglan (Kent, UK) I'll buy you a pint or two!
  5. Many thanks, that worked a treat, I doubt we'll have more than once instance in a column - but... is there a simple way of doing this recursively/nesting it? Thanks again R
  6. Hello, I'd like to be able to hold simple tags within my data that can be replaced in a calculated field with a full anchor on export: 'domain.co.uk' and replace with 'domain.co.uk' Any help would be greatly appreciated.

Important Information

By using this site, you agree to our Terms of Use.