Subject: Re: How to get output XML same as input XML?
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 14 Jul 2003 13:06:55 +0100
|
If I read your samples correctly, what you are trying to say is that
your stylesheet copied an attribute interact:isParameter
to the result and did not place a suitable namespace declaration in the
linearisation of the result tree.
If so that does not show a limitation in XSLT, it is simply a bug in
your processor.
me>I suspect your terminology here is non standard. a well formed document
me>can only have one child element of the root node.
> Correct. I am feeding two child elements of my root node separately to
> separate callings of the XSL processor.
As I suspected, they are not children of the root node, they are
children of the topmost element, root nodes are not elements in Xpath.
> So the following will be picked up by the
>processor as illegal:
>
><xsl:template name="openElement">
> <myElement>
></xsl:template>
That of course isn't an XSLT restriction, the input would not be passed
to XSLT at all as it wouldn't get past teh XML parser.
> If my output method is text then this problem does not happen.
that input would be an error to any XML application, and in particular
to XSLt, whatever output type.
> Otherwise
> I have to write more code which serializes every element into text, and I
> would like to have as much of that done for me as I can.
It's only a couple of templates, or a single extension function, both of
which can easily be found in the archives, the work is already done for
you.
David
________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|