[KLUG Members] XML/DSML/XSL Transform Help

Andrew Thompson tempes at ameritech.net
Sat Nov 13 00:09:28 EST 2004


It's been awhile since I've actually goofed around with XSLT, but I do
remember matching being a bit of a trick sometimes. Of course, this
being an at-work effort, I'd blame it on MSXML much of the time, but...

On Fri, 2004-11-12 at 11:55, Adam Tauno Williams wrote:
> Okay, I've come up with
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> <xsl:template match="/">

I seem to recall this failing with MSXML. Rather than trying to match
the root element, what you MIGHT want here is 'match="batchResponse"'

>  <result>
>   <xsl:for-each select="batchResponse/searchResponse/searchResultEntry">

Then, DROP 'batchResponse/' from the path here. I know, it doesn't make
a lot of sense for one to work and the other not, but like I said, I
seem to remember SOMETHING screwy like this causing me a buttload of
headaches. On the other hand, another thought comes to mind: perhaps you
should include the xmlns="urn:oasis:names:tc:DSML:2:0:core" in your
stylesheet? That MIGHT be throwing off your parser. I'd at least give it
a shot, see if it makes a difference.

If you could tell us what engine you're using, along with whatever
scripts and some sample data, I could probably play around with it a
little and see if I can come up with something.

-- 
Andrew Thompson <tempes at ameritech.net>
The Imagerie



More information about the Members mailing list