On Monday, Jan 20, 2003, at 22:04 Europe/London, J�rg Walter wrote:
My guess is that XML::LibXML does something special with xml: attributes so that we can't access them directly, otherwise it should just work. Either that or I'm doing something dumb in XSP.pm.On Monday, 20. January 2003 17:00, Alex Sergeyev wrote:I'm again with a problem.Other than a generic "There be Dragons" regarding XSP, not yet, sorry.
When I work with XSL stylesheet and xml:lang attribute everything is ok.
But when I added <?xml-stylesheet href="NULL"
type="application/x-xsp"?> to work with Util.pm taglib and look in 'trace'
files - all "xml:" prefixes was lost.
Also, same behavior when I setted
xmlns:xml='http://www.w3.org/XML/1998/namespace'
Any advices?
Namespaces support in XSP has always had it's gotchas, and it seems you found
another one. Unfortunately, it sounds like a nontrivial problem to me (wild
guess, not having looked at XSP.pm). Here's a quick workaround:
If you don't have any other "lang" attributes, put an XSLT stylesheet after
XSP which just matches all @lang's and replaces them with @xml:lang's.
If you do have, put a stylesheet before XSP, transforming all @xml:lang's into
@foobarmyweirdanduniqueattribute's and another one after XSP which undoes
that change. Dirty but works. Next time I visit XSP.pm I will see what I can
do.
Either way my suggestion would be to not have any xml:lang stuff in your XSP anyway - that's mixing presentation with your logic. If you want to localise stuff put it in your XSLT. What I tend to do is output just a plain tag in my XSP that I can recognise and localise in my XSLT later. For example, if a user login failed I might output:
<loginfailed/>
And then in my XSLT I can localise that to my heart's content.
Matt.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
