This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript 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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Parameter substitution for namespaces does not work?