473,837 Members | 1,501 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XSL transformation not finding template

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 I'm at a
complete loss as to what is wrong with the one below. This is a very
abbreviated server-config.wsdd:

<?xml version="1.0" encoding="UTF-8"?>
<deployment xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="htt p://xml.apache.org/axis/wsdd/providers/java">
<globalConfigur ation>
<parameter name="adminPass word" value="admin"/>
<parameter name="sendXsiTy pes" value="true"/>
<parameter name="sendMulti Refs" value="true"/>
<parameter name="sendXMLDe claration" value="true"/>
<parameter name="axis.send MinimizedElemen ts" value="true"/>
<requestFlow>
<handler type="java:org. apache.axis.han dlers.JWSHandle r">
<parameter name="scope" value="session"/>
</handler>
<handler type="java:org. apache.axis.han dlers.JWSHandle r">
<parameter name="scope" value="request"/>
<parameter name="extension " value=".jwr"/>
</handler>
<handler type="java:org. apache.axis.han dlers.SOAPMonit orHandler"/>
</requestFlow>
<responseFlow >
<handler type="java:org. apache.axis.han dlers.SOAPMonit orHandler"/>
</responseFlow>
</globalConfigura tion>
</deployment>

What I'd like to do is copy the entire file but filter out the global
request and response flow elements. To that end, I have created the
following XSL:

<?xml version="1.0" ?>
<xsl:styleshe et xmlns:xsl="http ://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="xml" version="1.0" />

<xsl:template match="@*|node( )">
<xsl:copy>
<xsl:apply-templates select="@*|node ()" />
</xsl:copy>
</xsl:template>

<xsl:template match="/deployment/globalConfigura tion/requestFlow" />

<xsl:template match="/deployment/globalConfigura tion/responseFlow" />
</xsl:stylesheet>

Basically, I want the XSL transformation to remove the
/deployment/globalConfigura tion/requestFlow and
/deployment/globalConfigura tion/responseFlow paths. As I said earlier, I
have done this quite successfully in web.xml (stripping out Axis
administration servlet) but I'm stumped as to why this wouldn't be working
in this instance.

Any help would be most appreciated.

--
Remove NOSPAM woven into e-mail address to reply directly.
Jul 20 '05 #1
4 2442
Kevin Dean wrote:
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 I'm at a
complete loss as to what is wrong with the one below. This is a very
abbreviated server-config.wsdd:

<?xml version="1.0" encoding="UTF-8"?>
<deployment xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="htt p://xml.apache.org/axis/wsdd/providers/java"> ....
</deployment>

What I'd like to do is copy the entire file but filter out the global
request and response flow elements. To that end, I have created the
following XSL:

<?xml version="1.0" ?>
<xsl:styleshe et xmlns:xsl="http ://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="xml" version="1.0" />
....
</xsl:stylesheet>

Basically, I want the XSL transformation to remove the
/deployment/globalConfigura tion/requestFlow and
/deployment/globalConfigura tion/responseFlow paths. As I said earlier, I
have done this quite successfully in web.xml (stripping out Axis
administration servlet) but I'm stumped as to why this wouldn't be working
in this instance.

Any help would be most appreciated.


Try specifying the source namespace in the stylesheet:

<xsl:styleshe et xmlns:xsl="http ://www.w3.org/1999/XSL/Transform"
xmlns="http://xml.apache.org/axis/wsdd/"
version="1.0">

-vin

Jul 20 '05 #2
No good. I still get the identity transformation back. Here's an even
simpler version of the XSL that should return an empty transformation but
doesn't:

<?xml version="1.0" ?>
<xsl:styleshe et xmlns:xsl="http ://www.w3.org/1999/XSL/Transform"
xmlns="http://xml.apache.org/axis/wsdd/" version="1.0">
<xsl:output method="xml" version="1.0" />

<xsl:template match="@*|node( )">
<xsl:copy>
<xsl:apply-templates select="@*|node ()" />
</xsl:copy>
</xsl:template>

<xsl:template match="/deployment" />
</xsl:stylesheet>

--
Remove NOSPAM woven into e-mail address to reply directly.

"vin sharma" <vi********@NOS PAM.hp.com> wrote in message
news:70******** *********@news. cpqcorp.net...
Kevin Dean wrote:
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 I'm at a
complete loss as to what is wrong with the one below. This is a very
abbreviated server-config.wsdd:

<?xml version="1.0" encoding="UTF-8"?>
<deployment xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="htt p://xml.apache.org/axis/wsdd/providers/java">

...
</deployment>

What I'd like to do is copy the entire file but filter out the global
request and response flow elements. To that end, I have created the
following XSL:

<?xml version="1.0" ?>
<xsl:styleshe et xmlns:xsl="http ://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="xml" version="1.0" />

...
</xsl:stylesheet>

Basically, I want the XSL transformation to remove the
/deployment/globalConfigura tion/requestFlow and
/deployment/globalConfigura tion/responseFlow paths. As I said earlier, I have done this quite successfully in web.xml (stripping out Axis
administration servlet) but I'm stumped as to why this wouldn't be working in this instance.

Any help would be most appreciated.


Try specifying the source namespace in the stylesheet:

<xsl:styleshe et xmlns:xsl="http ://www.w3.org/1999/XSL/Transform"
xmlns="http://xml.apache.org/axis/wsdd/"
version="1.0">

-vin

Jul 20 '05 #3
Hi Kevin,

Because the elements you are trying to filter out are bound to the default
namespace (i.e. xmlns="http://xml.apache.org/axis/wsdd/" ) in your input
XML.

So to match those elements - you need to declare that namespace in your
stylesheet with an arbitrary prefix (remember that namespaces are matched by
their URI rather than prefix). Then use that arbitrary prefix in your match
patterns, e.g.

<?xml version="1.0" ?>
<xsl:styleshe et version="1.0"
xmlns:xsl="http ://www.w3.org/1999/XSL/Transform"
xmlns:ws="http://xml.apache.org/axis/wsdd/">
<xsl:output method="xml" version="1.0" />

<xsl:template match="@*|node( )">
<xsl:copy>
<xsl:apply-templates select="@*|node ()" />
</xsl:copy>
</xsl:template>

<xsl:template match="ws:reque stFlow | ws:responseFlow " />

</xsl:stylesheet>

Hope this helps
Marrow
http://www.marrowsoft.com - home of Xselerator (XSLT IDE and debugger)
http://www.topxml.com/Xselerator
"Kevin Dean" <Nk*********@da tadevelopment.c om> wrote in message
news:zX******** *********@read1 .cgocable.net.. .
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 I'm at a
complete loss as to what is wrong with the one below. This is a very
abbreviated server-config.wsdd:

<?xml version="1.0" encoding="UTF-8"?>
<deployment xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="htt p://xml.apache.org/axis/wsdd/providers/java">
<globalConfigur ation>
<parameter name="adminPass word" value="admin"/>
<parameter name="sendXsiTy pes" value="true"/>
<parameter name="sendMulti Refs" value="true"/>
<parameter name="sendXMLDe claration" value="true"/>
<parameter name="axis.send MinimizedElemen ts" value="true"/>
<requestFlow>
<handler type="java:org. apache.axis.han dlers.JWSHandle r">
<parameter name="scope" value="session"/>
</handler>
<handler type="java:org. apache.axis.han dlers.JWSHandle r">
<parameter name="scope" value="request"/>
<parameter name="extension " value=".jwr"/>
</handler>
<handler type="java:org. apache.axis.han dlers.SOAPMonit orHandler"/>
</requestFlow>
<responseFlow >
<handler type="java:org. apache.axis.han dlers.SOAPMonit orHandler"/>
</responseFlow>
</globalConfigura tion>
</deployment>

What I'd like to do is copy the entire file but filter out the global
request and response flow elements. To that end, I have created the
following XSL:

<?xml version="1.0" ?>
<xsl:styleshe et xmlns:xsl="http ://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="xml" version="1.0" />

<xsl:template match="@*|node( )">
<xsl:copy>
<xsl:apply-templates select="@*|node ()" />
</xsl:copy>
</xsl:template>

<xsl:template match="/deployment/globalConfigura tion/requestFlow" />

<xsl:template match="/deployment/globalConfigura tion/responseFlow" />
</xsl:stylesheet>

Basically, I want the XSL transformation to remove the
/deployment/globalConfigura tion/requestFlow and
/deployment/globalConfigura tion/responseFlow paths. As I said earlier, I
have done this quite successfully in web.xml (stripping out Axis
administration servlet) but I'm stumped as to why this wouldn't be working
in this instance.

Any help would be most appreciated.

--
Remove NOSPAM woven into e-mail address to reply directly.

Jul 20 '05 #4
Perfect, thank you.

--
Remove NOSPAM woven into e-mail address to reply directly.
"Marrow" <marrow-NO-@-SPAM-marrowsoft.com> wrote in message
news:Oz******** ***********@new sfep2-win.server.ntli .net...
Hi Kevin,

Because the elements you are trying to filter out are bound to the default
namespace (i.e. xmlns="http://xml.apache.org/axis/wsdd/" ) in your input
XML.

So to match those elements - you need to declare that namespace in your
stylesheet with an arbitrary prefix (remember that namespaces are matched by their URI rather than prefix). Then use that arbitrary prefix in your match patterns, e.g.

<?xml version="1.0" ?>
<xsl:styleshe et version="1.0"
xmlns:xsl="http ://www.w3.org/1999/XSL/Transform"
xmlns:ws="http://xml.apache.org/axis/wsdd/">
<xsl:output method="xml" version="1.0" />

<xsl:template match="@*|node( )">
<xsl:copy>
<xsl:apply-templates select="@*|node ()" />
</xsl:copy>
</xsl:template>

<xsl:template match="ws:reque stFlow | ws:responseFlow " />

</xsl:stylesheet>

Hope this helps
Marrow
http://www.marrowsoft.com - home of Xselerator (XSLT IDE and debugger)
http://www.topxml.com/Xselerator
"Kevin Dean" <Nk*********@da tadevelopment.c om> wrote in message
news:zX******** *********@read1 .cgocable.net.. .
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 I'm at a
complete loss as to what is wrong with the one below. This is a very
abbreviated server-config.wsdd:

<?xml version="1.0" encoding="UTF-8"?>
<deployment xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="htt p://xml.apache.org/axis/wsdd/providers/java">
<globalConfigur ation>
<parameter name="adminPass word" value="admin"/>
<parameter name="sendXsiTy pes" value="true"/>
<parameter name="sendMulti Refs" value="true"/>
<parameter name="sendXMLDe claration" value="true"/>
<parameter name="axis.send MinimizedElemen ts" value="true"/>
<requestFlow>
<handler type="java:org. apache.axis.han dlers.JWSHandle r">
<parameter name="scope" value="session"/>
</handler>
<handler type="java:org. apache.axis.han dlers.JWSHandle r">
<parameter name="scope" value="request"/>
<parameter name="extension " value=".jwr"/>
</handler>
<handler type="java:org. apache.axis.han dlers.SOAPMonit orHandler"/>
</requestFlow>
<responseFlow >
<handler type="java:org. apache.axis.han dlers.SOAPMonit orHandler"/>
</responseFlow>
</globalConfigura tion>
</deployment>

What I'd like to do is copy the entire file but filter out the global
request and response flow elements. To that end, I have created the
following XSL:

<?xml version="1.0" ?>
<xsl:styleshe et xmlns:xsl="http ://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="xml" version="1.0" />

<xsl:template match="@*|node( )">
<xsl:copy>
<xsl:apply-templates select="@*|node ()" />
</xsl:copy>
</xsl:template>

<xsl:template match="/deployment/globalConfigura tion/requestFlow" />

<xsl:template match="/deployment/globalConfigura tion/responseFlow" />
</xsl:stylesheet>

Basically, I want the XSL transformation to remove the
/deployment/globalConfigura tion/requestFlow and
/deployment/globalConfigura tion/responseFlow paths. As I said earlier, I have done this quite successfully in web.xml (stripping out Axis
administration servlet) but I'm stumped as to why this wouldn't be working in this instance.

Any help would be most appreciated.

--
Remove NOSPAM woven into e-mail address to reply directly.


Jul 20 '05 #5

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

Similar topics

0
2714
by: Sergio del Amo | last post by:
Hi, I use the xslt functions provided by php. I am running in my computer the package xampp(www.apachefriends.org) which includes php/apache/mysql .. In this package the php includes the sablotron extension responsible for the xslt functions. The problem i have is that the obtained transformation is not the waited one. I try to proccess the same XML file with XSL file with a program called XMLspy and i obtained the desire and waited...
3
7931
by: pradeep gummi | last post by:
I have an XML FILE that is to be converted to Plain Text using an XSL file. Since I just want plain text, I do not want to set any root element during transformation.And if I do not any root element during transformation, it return s "java.lang.IllegalStateException: Root element not set" exception. If I add any element for the enclosed root, it works. Note: I am using XMLOutputter object of JDOM API, packages javax.xml.transform and...
8
2372
by: Will | last post by:
I was thrust into XML about 2 weeks ago and don't know much yet. From another department in the corp I am receiving an XML file which concatenates nodes all on one line i.e. <car><make>ford</make><color>red</color><year>2001</year></car><car><make><mb> etc. etc. etc. Some lines are over 300 characters long. I need to translate this spagetti XML into something which is humanly readable. I probably need to use XSL however I'm not sure...
4
4740
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 immediately followed by the input node text values in one long string -- no xml tags (barring the xml declaration, of course) appear in the output file. Anyone who wants to see either the input xml file or the xsl file, please let me know and I will...
1
4139
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). My problem is that for just about every element in the output document all of the namespace defintions defined in my top
6
1744
by: dave | last post by:
I really have 2 questions regarding the following xml snippet. The xml is a directory representation. <?xml version="1.0" standalone="yes"?> <FileSystem> <Row> <ID>1</ID> <Name>Root</Name> <Directory>Root</Directory> <Dir>true</Dir>
1
1730
by: sommarlov | last post by:
Hi everyone >From one of our systems an xml file is produced. I need to validate this file before we send it to an external system for a very lenghty process. I cannot change the xml file layout. The solution i got today is very slow, and i need help to find another solution. Here is the xml file. It consists of a list of position ids (ESTOXX50 INDEX_BM_E and FTSE INDEX_BM_E), and below that a list of tags for each position id. What i...
7
1494
by: Bilal | last post by:
Hello, I'm attempting to "populate" an template XML file with some data using identity transform (approach suggested by Joe K.; Thanks! :-) and have come across some strange behaviour using XMLSpy, AltovaXML, and xsltproc. The actual stylesheets are to be auto-generated by another stylesheet (that process I've worked out! :-) and now troubleshooting these generated stylesheets in XMLSpy's XSL debugger. So I'm wondering if my approach is...
4
4319
by: =?Utf-8?B?REZC?= | last post by:
Within an XSLT transformation, I'm trying to switch the default namespace within a section of the generated XML document to a shared namespace. This way, the content of this section does not have to use a prefix for the shared namespace, thus making the document smaller and easier to read. This worked in .NET 1.1 with no problem, but now appears to be broken in 2.0. When you try to do this, the following XslTransformException is...
0
10562
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10265
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9391
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6996
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5667
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5843
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4469
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4036
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3122
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.