[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|