473,387 Members | 1,844 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 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 2082


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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Ola Natvig | last post by:
Hi all I'm working with a long running, threaded server which serves HTTP requests with content which are passed through a XSLT processor. The XSLT processor I'm using is the Pyana processor. ...
6
by: Pete | last post by:
I am just getting to grips with XML and I was wondering if you could help me with something that no-one seems able or willing to help with.. I have an XSLT file which should be transforming a...
6
by: Ramon M. Felciano | last post by:
Helo all -- I'm trying to gain a deeper understand for what type of semi-declarative programming can be done through XML and XPath/XSLT. I'm looking at graph processing problems as a testbed for...
0
by: Mike | last post by:
I'm generating an XSLT document programatically in VB.Net. I'm then trying to apply that XSLT against a cXML document to generate my own internally developed XML document. I'm using RichTextBox...
4
by: Moogy | last post by:
I'm pulling my hair out here. First, I'm new to XML, so that doesn't help, but none of this makes any sense to me. All I'm trying to do is take a simple source XML file and translate it with an...
2
by: chris | last post by:
Hi there, I create an XML file from a dataset like this: System.IO.StreamWriter xmlSW = new System.IO.StreamWriter(FILENAME); dsUserData1.WriteXml(xmlSW, XmlWriteMode.WriteSchema);...
7
by: Harolds | last post by:
The code below worked in VS 2003 & dotnet framework 1.1 but now in VS 2005 the pmID is evaluated to "" instead of what the value is set to: .... xmlItems.Document = pmXML // Add the pmID...
3
by: thomas.porschberg | last post by:
Hi, I want to read records from a database and export it in an arbitrary format. My idea was to feed a class with a String array fetched from the database and let this class fire SAX events as...
3
by: RC | last post by:
Let's say: if (XMLHttpRequestObject.readyState == 4 && XMLHttpRequestObject.status == 200) { // Now I got an XML object here var xmlDocument = XMLHttpRequestObject.responseXML; // next I have...
0
by: ManWithNoName | last post by:
The following question is related to this thread: XSLT, document() function, filename, read non-standard/English characters (like µ) I have a XML file with a non-English character in its name...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.