jQuery in Action, 2nd edition*
The moose likes XML and Related Technologies and the fly likes Parameter substitution for namespaces does not work? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Parameter substitution for namespaces does not work?" Watch "Parameter substitution for namespaces does not work?" New topic
Author

Parameter substitution for namespaces does not work?

Rein Reezigt
Greenhorn

Joined: Apr 01, 2004
Posts: 1
Hello all,
For automatic web service generation, we generate multiple wsdl (xml) files from xml files.
The wsdl definition tag, holds several namespaces, e.g xmlns:intf and xmlns:impl. I need to set these namespaces different for each different wsdl file, so I created a parameter which is substituted in in the template.
so in my xsl I have :
...
<xsl utput method="xml" indent="yes"/>
<xsl aram name="impl"/>
...
(first step
<wsdl efinitions xmlns="http://schemas.xmlsoap.org/wsdl/"
blablabla
xmlns:impl="{$impl}">
I tried setting the parameter through both ant and a Java object. Both end up not substituting the parameter for the value I want it to be. It looks like it is completely ignored once it sees that the key starts with xmlns. If I would rename xmlns:impl with for example 'bitemexalan', then the parameter would be substituted.
I'm using xalan 2.6.0.
Does anyone have any idea? I kinda ran out of them.
Thanks in advance,
Rein
Balaji Loganathan
author and deputy
Bartender

Joined: Jul 13, 2001
Posts: 3150
Originally posted by Rein Reezigt:
Hello all,
<wsdl efinitions xmlns="http://schemas.xmlsoap.org/wsdl/"
blablabla
xmlns:impl="{$impl}">

Use xsl:element and xsl:attribute for generating Elements(definitions) and its attributes.
Sorry dont have instant example, plz use this as a clue.


Spritle Software Blogs
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Parameter substitution for namespaces does not work?
 
Similar Threads
SOAP envelope for Web service for newbie
Parsing an XML Document containing Namesapces using XPath and Xalan
java.io.IOException: Type {http://lang.java}Exception is referenced but not defined.
Why XSL failed to transform the XML when root node has namespace defined?
Issue with namespaces while consuming a service