Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

InDesign simple xsl for stripping out Rows


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

Recommended Posts

Posted

I'm working with InDesigns tags function to setup a filemaker xml import. While InDesign states that it can deal easily with a tree structure (by importing the root tag) it seems to choke on Filemakers raw xml. It imports the tags fine but when importing the actual xml data it gets confused by the tree structure. I manually removed all xml except that nested within the row tag (excepting of course the necessary xml headers) and InDesign was able to load and make use of the xml tags easily.

I've been playing with my own xsl but am having difficulty getting a simple xsl to just display the xml encased in 1 row. Somebody must have done this! Any samples out there?

Posted

FileMaker's raw xml export is not likely to match any other apps xml. That's the nature of the beast.

I have not seen an actual InDesign xml sample. So I couldn't tell you what the xsl would look like exactly. If you could post a small specific example, along with the raw xml exported by your FileMaker database (FMXMLRESULT and FMDSORESULT; so we could see which would be easier);* and a map of what goes with what (field in FileMaker matches what in the InDesign result),** we (and this is not the royal we) could likely come up with the xsl.

*This is easy to do, just choose the grammar, then export xml without an xsl stylesheet.

**You may have to hand-write the InDesign result (hopefully correct, including namespaces, if any), as we can't produce it yet.

Posted (edited)

Sorry I wasn't clearer. InDesign does not require a specific xml format. In fact they believe they can handle just about anything (through their tags tool). What I have found is that Filemakers FMPDSORESULT format will only work if most of the initial tags are removed. -

<?xml version="1.0" encoding="UTF-8" ?>

0

MyDB.fp7

My Name

needs to be transformed into:

<?xml version="1.0" encoding="UTF-8" ?>

My Name

I of course have more tags (fields) in there in addition to PARTICIPANT_NAME but that gives you the idea. So what I'm looking for - and assuming has been done before is an xsl to transform the FMPDSORESULT xml into another xml document that shows only the tags and everything they contain. It seems like the match would be easy but I'm fumbling.

Edited by Guest
Posted

You need to add some "root" element, which InDesign undoubtedly specifies. And some kind of name for a "row". And possibly it could be better written; but this seems to work:

<?xml version="1.0" encoding="UTF-8"?>



xmlns:fmp="http://www.filemaker.com/fmpdsoresult" exclude-result-prefixes="fmp">





	

		

			

				

					

						

							

						

					

								

			

			

	

Posted (edited)

It is: exclude-result-prefixes="fmp", in the top-level stylesheet tag, which removes the FileMaker namespace; "fmp" being what I wrote; you could use "fm", or whatever you want; it's user-specified; that's what the "x" in "xml" means; extensible.

Edited by Guest
Posted

Thanks a million. I was hoping to get something comprehensive - that could be applied to a variety of exports, this looks like it will work.

This topic is 6511 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.