[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Templates aplied to namespaces

Subject: Templates aplied to namespaces
From: Elliotte Rusty Harold <elharo@xxxxxxxxxxxxxxx>
Date: Sun, 19 Dec 1999 14:34:07 -0800
rusty template
I have an input document that looks like this:

<?xml version="1.0" encoding="UTF-8" ?> 
<ROOTELEMENT xmlns="http://www.somewhere.com/mynamespace">
 <ERRORCODE>0</ERRORCODE> 
 <BOOKLIST>
 <BOOK>
  <title>Three Men in a Boat: To Say Nothing of the Dog!</title> 
  <isbn>0140012133</isbn> 
 </BOOK>
 <BOOK>
  <title>Catch-22</title> 
  <isbn>0684833395</isbn> 
 </BOOK>
 </BOOKLIST>
</ROOTELEMENT>

The particular issue is that it uses the default namespace on its
elements but no prefix. I'm having a devil of a time getting a template
in the XSLT stylesheet to match up with anything by its name, either
with or without a prefix. Everything works fine if I remove the
namespace declaration from the input document. However declaring the
namespace in the stylesheet, with or without a prefix, doesn't seem to
help. 

I'm using xt. Does anyone have any suggestions; for instance a template
rule that would match a title element in the above document? Thanks.

+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo@xxxxxxxxxxxxxxx | Writer/Programmer |
+-----------------------+------------------------+-------------------+ 
|               Java I/O (O'Reilly & Associates, 1999)               |
|            http://metalab.unc.edu/javafaq/books/javaio/            |
|   http://www.amazon.com/exec/obidos/ISBN=1565924851/cafeaulaitA/   |
+----------------------------------+---------------------------------+
|  Read Cafe au Lait for Java News:  http://metalab.unc.edu/javafaq/ | 
|  Read Cafe con Leche for XML News: http://metalab.unc.edu/xml/     |
+----------------------------------+---------------------------------+


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.