[KLUG Members] XML/DSML/XSL Transform Help

Andrew Thompson tempes at ameritech.net
Sat Nov 13 18:25:04 EST 2004


On Sat, 2004-11-13 at 15:21, Adam Tauno Williams wrote:
> Okay, now I'm trying...

[much snippage]

> And I get, to me very oddly...

[more snippage]

> That isn't XML!

No, but it's more than blank output, which I THINK is what you were
getting before? Now, let me think, here. I basically made TWO
suggestions: add the namespace declaration, and change those two match
settings. It looks like you're trying both together here. Have you tried
them separately? If not, I'd recommend that, and see how the results
differ, if they do.

It does seem odd that your non-XSLT elements aren't being preserved.
xsltproc SHOULD be passing those through as-is, except for the xsl:
elements, which obviously it's supposed to process and replace with the
results. I'm not sure what the problem is there.

Something I would suggest is to start with an extremely simple template
and build on it. If you've done this a lot, this is probably going to
sound like a nursery school lesson, but I'd start with a template with
just a line of raw text, and adjust its match 'til you start getting
output. Then include a value-of element that pulls ONE attribute you
KNOW should be in the element you're supposed to be matching, and again,
play with matching until you're getting that attribute where it should
be. Around that point, add a non-XSLT element (an empty one) to the
template and see if that gets dumped to output as tags or not. If it
doesn't look like it, put some raw text inside the element, and see if
THAT gets dumped. If it does, but has no bracketing tags, there's
definitely something screwy going on there, but I couldn't tell you
what, just now. You might need an xsl:output-type element, but I'm not
sure off the top of my head what needs to go in it.

I'll see if I can't do some testing on the sample data you've posted
later tonight. Meanwhile, if you haven't seen it already, you MIGHT find
these guides from Mulberry Technologies helpful. They have quick
references both for XML and XSLT. They're pdf files you can download
from http://www.mulberrytech.com/quickref/index.html.
-- 
Andrew Thompson <tempes at ameritech.net>
The Imagerie



More information about the Members mailing list