xsl-list
[Top] [All Lists]

Re: Can't make template match root element with schema info

2005-03-16 04:01:47


Hi,

First of all, by default namespace I meant no-namespace. And never mind
about the default behaviour. That was just my way of understanding
namespaces.

Unprefixed element names in XPath 1
_always_ refer to elements in no-namespace nt elements in the default
namespace of the source or stylesheet, this is not a "default behaviour"
that can be overridden, it is fixed.

The mention of XPath 1 too has taken me by surprise.For this discussion I
was using the term XSLT though the topic had more to do more with XPATH.

does that mean both the xml file and stylesheet files are processing
elements in the no-namespace event though the root element has a
"xmlns=http://somenamespace"; albeit without a prefix. How do you explain
that the templates in my xsl matched elements that had "html:" prefixes and
still found them. Iam referring to the xhtml2fo transformation in my
earlier mail.

Cheers,
Omprakash.V











                                                                                
                                   
                    David                                                       
                                   
                    Carlisle             To:     
xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com                                
   
                    <davidc(_at_)nag(_dot_)c        cc:     (bcc: 
omprakash.v/Polaris)                                        
                    o.uk>                Subject:     Re: [xsl] Can't make 
template match root element with schema 
                                         info                                   
                                   
                    03/16/2005                                                  
                                   
                    02:43 PM                                                    
                                   
                    Please                                                      
                                   
                    respond to                                                  
                                   
                    xsl-list                                                    
                                   
                                                                                
                                   
                                                                                
                                   





  This is sort of like the namespace declaration causes the stylesheet to
  override its default behavior which is to treat elements as being in the
  default namespace. Alternately, one may specify a prefix in the namespace
  declaration with a prefix and use the prefix everywhere in the xml file
and
  get the same behavior.

No. Xpath can not tell (normally) whether an element is in the default
namespace or not. the "default namespace" is just like "the namespace
bound to the prefix x" except that teh "prefix" in thi scase is empty.

With the single exception of the name() function, prefixes used in the
source (or non-prefixes in the case of the default namespace) are not
available to XPath (or XSLT).  Unprefixed element names in XPath 1
_always_ refer to elements in no-namespace nt elements in the default
namespace of the source or stylesheet, this is not a "default behaviour"
that can be overridden, it is fixed.

David


________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

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






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

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