Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 3479 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted (edited)

(Posted too quick, should probably be moved to Importing & exporting > XML/XSL)

Hi All

I'm trying to import and XML data source but am having problems getting the data in. I can download the XML locally and import it with my XSL without a problem.  I've also tested the URL generated by the script on http://www.freeformatter.com/xsl-transformer.html successfully. I can view the URL in a web viewer object OK.

It fails when I try to import AND when I try to insert from URL into a text field.  I've tried various combinations of encoded/decoded characters in the URL but no luck yet.  Open to any suggestions (except download it locally and then import it... I could script it with wget but that's an extreme last resort)

URL calculation was initially generated by doing a manual search on http://www.nla.gov.au/apps/srw/search/peopleaustralia and copying the resulting URL into a calculation and then substituting field names where relevant.

Sample URL: http://www.nla.gov.au/apps/srw/search/peopleaustralia?query=bath.name+%3D+"Bruce"&version=1.1&operation=searchRetrieve&recordSchema=info:srw/schema/1/dc-v1.1&maximumRecords=10&startRecord=1&resultSetTTL=300&recordPacking=xml&recordXPath=&sortKeys= (double quotes are also encoded)

My XSLT: http://files.digitisation.unimelb.edu.au/xsl/nla-peopleaustralia-dc-fm12.xsl

Diagnostics in text field inserted from URL

<?xml version="1.0" encoding="UTF-8" ?> 
<searchRetrieveResponse xmlns="http://www.loc.gov/zing/srw/">
...
<diagnostics xmlns:ns2="http://www.loc.gov/zing/srw/">
<ns3:diagnostic xmlns:ns3="http://www.loc.gov/zing/srw/diagnostic/">
<ns3:uri>info:srw/diagnostic/1/10</ns3:uri>
<ns3:details>expected boolean, got string: &quot;Bruce&quot;</ns3:details>
...

Sample database attached. Lookup script puts the URL in a text field, the web viewer and Insert from URL into the adjacent text field.  The text field and web viewer should display the same data

NLA_PeopleAustralia.zip

Edited by Ben Kreunen
Posted

It's not the same URL that their form returns

Well no, because I assumed they will supply the defaults if you don't override them explicitly. But the main point here is that you shouldn't escape the quotes or the = sign.

Posted

I had tried it with a decoded URL, but not with single quotes... yes, I was too focused on one problem and not thinking about what I "should" have been using.

Posted

I had tried it with a decoded URL, but not with single quotes

It will work with double quotes just as well:

Let ( [
template ="http://www.nla.gov.au/apps/srw/search/peopleaustralia?query=bath.name=\"$name$\""
] ;
Substitute ( template ; "$name$" ; Table::gSearchName )
)

I chose single quotes purely for convenience, to avoid the escaping within Filemaker.

Posted

Built some more complex searches but used http://www.url-encode-decode.com/ to avoid making mistakes  ;-)  Back on track now.

Adding in optional criteria if available/relevant to narrow down the data retrieved eg. person was alive in the same decade of publication of journal article (for authors)... I think I'll switch to using multiple templates as in your example for the different components to reduce the clutter in the calculation for debugging.

This topic is 3479 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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