xsl-list
[Top] [All Lists]

[xsl] Target Namespace in XML breaks XSL transform

2006-03-24 11:51:53
Hi, 

When I specify a target namespace for the root element in my XSL document,
 
e.g. <Events xmlns="urn:cde.berkeley.edu:babl:events:1.00"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="urn:cde.berkeley.edu:babl:events:1.00 UCBEvents.xsd">

it appears that I then need to use a namespace prefix for every element from
that document referenced in my XSL transform.

So I can't do this:
<xsl:value-of select="Events/View/FormatCalendar/ShortName"/>

But instead have to do this:
<xsl:value-of select="ev:Events/ev:View/ev:FormatCalendar/ev:ShortName"/>

This is a huge stylesheet and there are three different stylesheets I'd have
to modify, so to do this MANY changes will have to be made. I need the
target namespace in my XML document if I want to validate it. Is there any
way around modifying all my XSLs?

Thanks!

Allison Bloodworth
Principal Administrative Analyst
Technology Program Office
University of California, Berkeley
(415) 377-8243
abloodworth(_at_)berkeley(_dot_)edu




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

<Prev in Thread] Current Thread [Next in Thread>