xsl-list
[Top] [All Lists]

RE: [xsl] empty namespace declaration being generated

2007-01-23 16:51:07
Oddly enough, there are some stylesheets that experienced members of this
list can debug with a fair degree of certainty without seeing a single line
of your code. There's always the possibility, though, that you have achieved
the same effect by a completely different route, so before sticking my neck
out and telling you what you've done wrong, I would prefer to see what you
have done.

Michael Kay
http://www.saxonica.com/

-----Original Message-----
From: Scott Smith [mailto:ssmith(_at_)mainstreamdata(_dot_)com] 
Sent: 23 January 2007 22:47
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] empty namespace declaration being generated

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>
--~--



--~------------------------------------------------------------------
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>
--~--