xsl-list
[Top] [All Lists]

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

2019-01-07 09:47:13
Hi Syd --

I tried to post my XML and XSL to the list but it got rejected for size.  Will 
send to you offlist...

Michele

-----Original Message-----
From: Syd Bauman s(_dot_)bauman(_at_)northeastern(_dot_)edu 
<xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com> 
Sent: Monday, January 7, 2019 10:23 AM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] Ignoring quotation marks in grouping and sorting

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
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

<Prev in Thread] Current Thread [Next in Thread>