Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xsl] Proposed syntax for namespace binding in XPath

From: Florent Georges <darkman_spam@-------->
To:
Date: 4/1/2007 3:15:00 AM
Michael Kay wrote:

  Hi

  I'm not an expert in those matters, but following are a few comments
that can be useful, maybe.

> xmlns(abc=http://example.com/ns/abc)

> There are several disadvantages to adopting this directly.
> It doesn't allow the default namespace to be bound;

  A simple extension would permit that, for example:

    xmlns(http://example.com/)

> it's not easily distinguishable from a function call; it
> can't handle a URI containing an unpaired right bracket;

  Mmh, with URI escaping, I think there would be no problem.

> and it doesn't fall back to pure XPath when there are no
> bindings.

  I guess this is the main problem.  On the other hand, the bindings
will be in most cases needed to evaluate the whole expression.  So for
implementations that do not support this namespace declaration
mechanism, the binding should then be declared in another way,
depending on the implementation.  In such cases, defining the xmlns()
function to evaluate to the empty sequence or to be ignored could be
possible.

> Using a special comment has the advantage that XPath processors
> that don't understand the notation will ignore it

  The main advantage, for sure.

> (though I freely admit that "meaningful comments" have their
> drawbacks).

  Indeed.

  This could break existing yet stuff.  The xmlns() solution won't, I
think.  Except that, I think the only differences between the two
solutions are:

  1/ with the first one, non-supporting XPath processors will try
     to call the function xmlns()

  2/ the second one is using comments

  BTW, is it better the non-supporting XPath processors ignore the
declarations or failed to evaluate the expression?  On the one hand,
with the special comments the same expression can be used by all
processors (but we have to declare namespace bindings in another way
for non-supporting processors), and on the other hand with xmlns() a
clear error message will be displayed when using such an expression
with a non-supporting processor ("error because xmlns() function not
known at position xx").

  Regards,

--drkm





















	

	
		
___________________________________________________________________________ 
Dicouvrez une nouvelle fagon d'obtenir des riponses ` toutes vos questions ! 
Profitez des connaissances, des opinions et des expiriences des internautes sur Yahoo! Questions/Riponses 
http://fr.answers.yahoo.com


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent