Grzegorz Can you recommend a tutorial or other info for prefix-independent XSLT?
Robin Rigby [EMAIL PROTECTED] http://www.gondolier.org.uk 07785 765017 -----Original Message----- From: Grzegorz Kossakowski [mailto:[EMAIL PROTECTED] Sent: 18 July 2007 13:51 To: [email protected] Subject: Re: Namespace: behaviour differences Derek Hohls pisze: > I am getting strange problems on the production machine vs the test > behaviour on my PC. > > A query like this: > <?xml version="1.0" encoding="UTF-8"?> > <page > xmlns:sq2="http://apache.org/cocoon/SQL/2.0" > xmlns:jx="http://apache.org/cocoon/templates/jx/1.0" > <sq2:execute-query> > <sq2:query name="program-view"> > select * from client > </sq2:query> > </sq2:execute-query> > </page> > > results in this output locally: > <?xml version="1.0" encoding="UTF-8" ?> > <page xmlns:sq2="http://apache.org/cocoon/SQL/2.0" > xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"> > <sq2:rowset nrofrows="1" name="client-view"> > > but on the server I get: > > <?xml version="1.0" encoding="UTF-8" ?> > <page xmlns:sq2="http://apache.org/cocoon/SQL/2.0" > xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"> > <rowset xmlns="http://apache.org/cocoon/SQL/2.0" nrofrows="1" > name="client-view"> > > and as a consequence, the stylesheets do not function, as they are > looking for the sq2: prefix. > > How do ensure that Cocoon on the server retains the sq2: prefix.... > and why does it strip it off in the first place? I don't know why do you experience such differences but I would like to point out that both XML snippets are equivalent in terms defined in XML spec. In short: you should never rely on namespace prefix because it's only a shorthand that can vary. Before you try to discover the roots of this behaviour I would suggest you to try rewrite your stylesheets to be prefix-independent. -- Grzegorz Kossakowski http://reflectingonthevicissitudes.wordpress.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
