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

RE: adding namespaces to result nodes

Subject: RE: adding namespaces to result nodes
From: omprakash.v@xxxxxxxxxxxxx
Date: Fri, 8 Apr 2005 16:44:44 +0530
dom add namespace
Hi Mike,
         Iam taking the text of an element in the input file and making it
into an element. The element in question is named 'slideshow' and it
doesn't have a prefix. You say
"the processor may put the element in the default namespace, or it may
invent a prefix"
Does this mean the processor Iam using (xalan) is adding the prefix whereas
another processor may not.

Iam not tied to any processor and I may opt for another processor if this
is the case other things permitting.

Also you suggested a workaround using xsl:copy-of in your earlier mail.
Will this prevent the prefixes from getting added.

Also, I would like to know how to add another namespace say for eg the
schema namespace to an element created in the default namespace.

Cheers,
Omprakash.V















                                                                                                                   
                    "Michael Kay"                                                                                  
                    <mike@saxonic        To:     <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>                                 
                    a.com>               cc:     (bcc: omprakash.v/Polaris)                                        
                                         Subject:     RE:  adding namespaces to result nodes                  
                    04/08/2005                                                                                     
                    04:22 PM                                                                                       
                    Please                                                                                         
                    respond to                                                                                     
                    xsl-list                                                                                       
                                                                                                                   
                                                                                                                   




> <xsl:element name="{$elemname}" namespace="{$nsname}">
>
>
> As you can see the inverse transformed output has prefixes where my
> original had none. Also, the prefixes are numbered like ns0,
> ns1 etc. which
> I don't think is not correct.

You haven't said what the value of $elemname is. If it includes a prefix,
then most XSLT 1.0 processors will attempt to use that prefix, thought they
aren't obliged to do so. If it doesn't include a prefix, then the processor
may put the element in the default namespace, or it may invent a prefix.

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






This e-Mail may contain proprietary and confidential information and is sent for the intended recipient(s) only. 
If by an addressing or transmission error this mail has been misdirected to you, you are requested to delete this mail immediately.
You are also hereby notified that any use, any form of reproduction, dissemination, copying, disclosure, modification,
distribution and/or publication of this e-mail message, contents or its attachment other than by its intended recipient/s is strictly prohibited.

Visit Us at http://www.polaris.co.in

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.