January 24, 200718 yr 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?
January 24, 200718 yr 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.
January 24, 200718 yr Author 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 January 24, 200718 yr by Guest
January 24, 200718 yr 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">
January 24, 200718 yr 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 January 24, 200718 yr by Guest
January 25, 200718 yr Author 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.
Create an account or sign in to comment