473,320 Members | 1,600 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,320 software developers and data experts.

Problems. Transformation and namespaces.

Hello,

I wrote an xslt to apply to a XML. The output that I expect is:

<TEST>
Test Output
</TEST>

But i get en empty XML...I know that is a problem of the namespace in
XML but I don't know how solve it...so please...someone could explain
me what is wrong?

Thank you in advance.
---
XML FILE
---
<deployment xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">

<service name="TestAxis" provider="java:RPC" style="rpc"
use="encoded">
<parameter name="wsdlTargetNamespace" value="http://www.xyz.com"/>
</service>

</deployment>
---

---
XSLT FILE
---
<xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform">
<xsl:output method = "xml" indent = "yes"/>

<xsl:template match = "deployment">
<TEST>
<xsl:apply-templates select="service"/>
</TEST>
</xsl:template>

<xsl:template match = "deployment">
Test Output
</xsl:template>

</xsl:stylesheet>

---
Jul 20 '05 #1
1 1442
Tempore 10:30:36, die Friday 28 January 2005 AD, hinc in foro {comp.text.xml} scripsit Pablo <pp******@hotmail.com>:
I get en empty XML...I know that is a problem of the namespace in
XML but I don't know how solve it...so please...someone could explain
me what is wrong?

Hi,

You have to include the namespace uri when you try matching 'deployment' elements. You can do this by declaring a namespace with a uri identical to the corresponding uri in the XML document. You are free to choose a prefix name. (in this example: 'wsd')

<xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" xmlns:wsd="http://xml.apache.org/axis/wsdd/" version="1.0">
<xsl:output method = "xml" indent = "yes"/>

<xsl:template match="wsd:deployment">
Test Output
</xsl:template>

</xsl:stylesheet>
regards,
--
Joris Gillis (http://www.ticalc.org/cgi-bin/acct-v...i?userid=38041)
Deserta faciunt et innovationem appelant
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Doug Farrell | last post by:
Hi all, I'm trying to use the 4Suite xml/xsl tools to transform some XML data into HTML. I'm using some examples from the O'Reilly book "Python and XML" and things are blowing up. Here is the...
4
by: Kevin Dean | last post by:
I'm trying to create an XSL transformation that will strip out development-specific attributes from deployment descriptors and other XML files. I have already successfully done so with web.xml but...
4
by: Mike Conmackie | last post by:
Hi Folks, I've probably omitted something very basic but I have no idea what it might be. The results of my transformation _should_ be an xml file but all I get is the xml declaration...
1
by: Chris Bedford | last post by:
Hi: this question has been driving me crazy. would be grateful for any help. I am writing a version of the identity transformation to filter some documents (they happen to be wsdl docs)....
6
by: Stefan Franke | last post by:
Hi, I've got a little bit of a problem when dealing with namespaces and XPath. I'm trying very basic things, like showing all the nodes of one particular namespace. Here is my XPath statement:...
1
by: Jens Mueller | last post by:
Hi there, this is a Java-XML Question, so I am not sure whether this is the right place, haven't found anything better .... I try to convert a Java object to XML via SAX and let the FOP...
1
by: jorgen.wahlund | last post by:
Hi I have problems with transforming a xml document with Xalan and javax.xml.Transformer. Following xsl is used: <xsl:stylesheet version='1.0'...
0
by: Tim_Mac | last post by:
hi, i have an aspx page, which loads a user control dynamically. (by the way i don't have any problems using namespaces in C# web projects, this seems to be just a VB thing). the user control...
84
by: jacob navia | last post by:
As many people know, I think that garbage collection is a good solution for many memory allocation problems. I am aware however, that nothing is "the silver bullet", not even the GC. A recent...
5
by: Simon | last post by:
I have problem with namespaces. I have a program that consumes the web service and has for instance names space nsProgram. In this program I have defined several classes that I use for storing and...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.