Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

URL encoding problem(?) importing XML data source

Featured Replies

(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

  • Author

Yes. Thanks.  It's not the same URL that their form returns but it also makes sense. Should have thought of that ;-)

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.

  • Author

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.

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.

  • Author

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.

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.