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

RE: Attribute Displayed on Output

Subject: RE: Attribute Displayed on Output
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Fri, 4 Mar 2005 21:50:46 -0000
RE:  Attribute Displayed on Output
> Although it's still not working for Version 2.0, I did
> get it to work in Version 1.0 with one exception:  It
> was displaying the namespace in the output element. 
> For example, my XSL file adds a tag like <a/> to the
> output file under a certain condition.  Unfortunately,
> the output is making it look like:
> 
> <a xmlns:x="yyyyy" xmlns=""/>

First point: do you want the <a> element to be in a namespace or not? If you
want it in a namespace, your stylesheet must put it in a namespace. If you
don't put it in a namespace, the system may have to undeclare the default
namespace in order to ensure that it doesn't go in one. That's what the
xmlns="" is doing.

Second point: if xmlns:x="yyyy" is being copied from the stylesheet, and if
it really isn't used in the output, you can use exclude-result-prefixes to
get rid of it.

> 
> Also, is there a way to automatically assign the
> prefix in the namespace declaration to every element
> in the file, instead of doing it manually for large
> files.  

I'm sorry, I don't understand the question. Which file are we talking about
- source, stylesheet, or result?

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

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.