471,083 Members | 1,086 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,083 software developers and data experts.

XSLT problem

Hello,

I want to transfer a XML node with a XSL stylesheet into another XML
document like this:

source XML...
---------------------------
....
<flowText font-size="20" xml:space="preserve"
xmlns="http://xml.apache.org/batik/ext">
Hello World
</flowText>
....

xsl...
---------------------------
....
<xsl:template match="flowText ">
Test...
<xsl:apply-templates/>
</xsl:template>
....

result XML (I want to see this...)
----------------------------
Test... Hello World
(but I see nothing)
-----------------------------
I think the processor can´t find the node because of this
"xml:space="preserve" xmlns="http://xml.apache.org/batik/ext"
attribute! Did anybody know a solution of my problem?

THX
Jul 20 '05 #1
2 1903


Tech wrote:
I want to transfer a XML node with a XSL stylesheet into another XML
document like this:

source XML...
---------------------------
...
<flowText font-size="20" xml:space="preserve"
xmlns="http://xml.apache.org/batik/ext">
Hello World
</flowText>
...

xsl...
You need
<xsl:stylesheet
xmlns:somePrefix="http://xml.apache.org/batik/ext" ...> ...
<xsl:template match="flowText ">
<xsl:template match="somePrefix:flowText">
Test...
<xsl:apply-templates/>
</xsl:template>
...

--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #2
In article <de**************************@posting.google.com >,
Tech <so***@gmx.de> wrote:

[...]

% result XML (I want to see this...)
% ----------------------------
% Test... Hello World

In addition to the name-space issue mentioned in another reply, this is
not XML. You'll need <xsl:output method='text'/> at the top of the style
sheet to get this output.

--

Patrick TJ McPhee
East York Canada
pt**@interlog.com
Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Pete | last post: by
reply views Thread by Mike | last post: by
4 posts views Thread by Moogy | last post: by
2 posts views Thread by chris | last post: by
7 posts views Thread by Harolds | last post: by
3 posts views Thread by thomas.porschberg | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.