xsl-list
[Top] [All Lists]

[xsl] empty namespace declaration being generated

2007-01-23 15:47:01
I'm doing an XSL transform where I need to pull some stock ticker symbols from 
one xml format and generate a different file format.  In the original source 
xml file they look something like:

 

<ticker>nyse:ibm</ticker>

 

And I need to transform this into something like:

 

<security name="nyse:ibm"/>

 

The problem is that I always end up with:

 

<security xmlns="" name="nyse:ibm"/>

 

I don't want the 'xmlns=""' since it causes validation of the file to fail.

 

I guessed that Xalan was thinking that "nyse" was a namespace and adding the 
xmlns="" to indicate that the name space for other elements in the element were 
using the default namespace.  So, I rewrote the xsl transform to strip the 
"nyse:", but it still does the same thing:

 

<security xmlns="" name="ibm" />

 

I also edited the source xml file and removed the "nyse:" portion (which I 
can't do in production) assuming that this would verify that this was causing 
the problem.  It still generated the 'xmlns=""' code so it appears my guess is 
wrong.

 

Has anyone seen anything like this before?  Any suggestions on figuring out 
what is going on?

 

Scott 

 

 

 


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--