cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Baptiste Placé <bo...@free.fr>
Subject Re: Namespace: behaviour differences
Date Thu, 19 Jul 2007 09:41:36 GMT
Derek,

Maybe you should dig deeper in this magic faq :)
I found the last question [1] interesting :
It is about determining the prefix used in the source document, you may 
be able to stock the sql prefix in a variable and use it in your match.

Baptiste

[1] http://www.dpawson.co.uk/xsl/sect2/N5536.html#d7594e2485

Derek Hohls a écrit :
> Baptiste
>  
> Interestingly, one of the examples on identifying elements by
> namespace, where there is more than one namespace present,
> is written by Jeni Tennison, who is certainly one of the gurus of
> XSLT - she simply uses prefixes in this example:
> http://www.dpawson.co.uk/xsl/sect2/N5536.html#d7594e1096 
> (just as well she is not working with Cocoon!)
>
> and this example:
> http://www.dpawson.co.uk/xsl/sect2/N5536.html#d7594e655 
> by David Carlisle also suggests using prefixes in the source
> document to ensure a stylesheet works - which we cannot
> do because we seemingly have no control over how the SQL
> Transformer creates the output (ito of keeping prefixes)
>  
> So... no joy yet ito practical examples, but I will look as and 
> when I have time....  if anyone else has a link to specific 
> examples, I would appreciate it.
>
>   
>>>> Baptiste Placé <bonka@free.fr> 2007/07/19 09:46 AM >>>
>>>>         
>
> Hello,
>
> You may find more examples on the issue on XSLT Questions and Answers [1].
> Great resource for XSLT, it may help.
>
> Baptiste.
>
> [1] http://www.dpawson.co.uk/xsl/sect2/sect21.html 
>
> Derek Hohls a écrit :
>   
>> Grzegorz 
>>  
>> OK; maybe that is what I was asking - where are these "standard
>> techniques" -
>> I have not come across any such examples in my years of working with
>> XSLT
>> and have never before had problems of the sort that are happening now.
>> Any pointers, apart from those to the spec (which is not an easy
>> document at the
>> best of times ;-)
>>  
>> Derek
>>
>>   
>>     
>>>>> Grzegorz Kossakowski <gkossakowski@apache.org> 2007/07/18 08:31
PM
>>>>>
>>>>>         
>>>>>           
>> Robin Rigby pisze:
>>   
>>     
>>> Grzegorz
>>>
>>> Can you recommend a tutorial or other info for prefix-independent
>>>     
>>>       
>> XSLT?
>>
>> I'm not sure if such tutorial would exist because if you write
>> stylesheets using standard techniques they are prefix-independent. You
>> make 
>> your stylesheet relying on namespace prefix if you use name()[1]
>> function instead of local-name()[2].
>>
>> Even if you reference elements in stylesheet using prefix it's defined
>> in that stylesheet _locally_. It means that you could use different 
>> prefixes (pointing to the same namespace, of course) in processed XML
>> and XSL stylesheet and it should work.
>>
>> I think it's crucial to understand that prefix is defined locally and
>> is not part of element's name but only element's expanded name.
>>
>> [1] http://www.w3.org/TR/xpath#function-name 
>> [2] http://www.w3.org/TR/xpath#function-local-name 
>>
>>   
>>     
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org 
> For additional commands, e-mail: users-help@cocoon.apache.org 
>
>
>
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message