Re: [xsl] Ignoring quotation marks in grouping and sorting

Subject: Re: [xsl] Ignoring quotation marks in grouping and sorting
From: "Syd Bauman s.bauman@xxxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 7 Jan 2019 15:22:55 -0000
Oooh. I had completely forgotten that FMP has its own internal XSLT
transform capability. Yes, to my (limited) knowledge, Xalan is an XSLT
1.0 processor.

As for the "getValue" template I showed you (off-list for those who
are confused), it is designed to be called once *from the template
processing an individual FMPXMLRESULT row*, and used to set a variable
when called. Then any subsequent references are via to that variable.

But if what you are doing is sorting rows, as it were, that may not
work for you. I am not sure w/o looking at your program (and even then
may not be sure. :-) if there is an easy way around that. (IIRC,
<xsl:key>, at least in XSLT 1.0, cannot have children. I.e., you
cannot use construction elements as the content of <xsl:key> in place
of @use.)

Would be very helpful if you could post your complete input (perhaps
with only a few lines of fake data if you don't want to reveal your
real data to the world), and the corresponding desired output. You may
want to post your XSLT 1.0 you have so far, as well.

All that said, access by field name (which is what "getValue" does) is
easier to work with and more robust, but if using COL[2] and an
<xsl:sort> is working for you, it may be just fine to leave well
enough alone. :-)

> Thanks, Syd, the "getValue" template looks very useful. Am I right
> in thinking that I would need to call this template all three places
> -- i.e., where I'm setting up the keys, where I do the grouping for
> output, and where I sort the output for each letter? Because the
> leading quote needs to be ignored in all three places.
> 
> Also, just FYI, I was wrong about the XSLT processor. We use Saxon
> for our standalone transforms but this one happens as part of a
> FileMaker export (FMP offers the option of applying a style sheet as
> part of the XML export process). According to the documentation,
> "...The XML import and export features in FileMaker Pro use an XML
> parser called Xerces and an XSLT style sheet processor called
> Xalan." From what I can glean from the FileMaker community, it's
> rather old tech and doesn't support 2.0 let alone 3.0

Current Thread