You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Sylvain Wallez <sy...@apache.org> on 2005/04/14 17:50:06 UTC
Re: JX generates weird NameSpace???
oceatoon wrote:
>Hi everyone
>
> Is anybody aware of such a thing as JX generating a weirds namespaces??
><head xmlns:%@$#^@#="%@$#^@#">
>
>weird !! and blocking...grrrr
>
>This seems to happen only on a cforms / jx mixed page, I tested simple jx is
>ok.
>
>
Fixed. The problem comes from the fact that including macros starts some
prefix mappings and ends them with no elements inbetween, and this seems
to confuse Xalan a lot. This was a blocker for Ajax-in-CForms as
Firefox's parser was failing on error when encountering this namespace.
I added a o.a.c.xml.RedundantNamespacesFilter class that filters the
output of JXTG to ensure namespaces are not mulitply declared and that
empty namespaces scopes are filtered out.
Sylvain
--
Sylvain Wallez Anyware Technologies
http://apache.org/~sylvain http://anyware-tech.com
Apache Software Foundation Member Research & Technology Director
Re: JX generates weird NameSpace???
Posted by Juan Jose Pablos <ch...@apache.org>.
Sylvain Wallez wrote:
> oceatoon wrote:
>
>> Hi everyone
>> Is anybody aware of such a thing as JX generating a weirds namespaces??
>> <head xmlns:%@$#^@#="%@$#^@#">
>> weird !! and blocking...grrrr
>>
>> This seems to happen only on a cforms / jx mixed page, I tested simple
>> jx is
>> ok.
>>
>>
>
> Fixed. The problem comes from the fact that including macros starts some
> prefix mappings and ends them with no elements inbetween, and this seems
> to confuse Xalan a lot. This was a blocker for Ajax-in-CForms as
> Firefox's parser was failing on error when encountering this namespace.
nice one!!!!
Re: JX generates weird NameSpace???
Posted by Sylvain Wallez <sy...@apache.org>.
Ben Pope wrote:
> Sylvain Wallez wrote:
>
>> oceatoon wrote:
>>
>>> Hi everyone
>>> Is anybody aware of such a thing as JX generating a weirds namespaces??
>>> <head xmlns:%@$#^@#="%@$#^@#">
>>> weird !! and blocking...grrrr
>>>
>>> This seems to happen only on a cforms / jx mixed page, I tested
>>> simple jx is
>>> ok.
>>>
>>>
>>
>> Fixed. The problem comes from the fact that including macros starts
>> some prefix mappings and ends them with no elements inbetween, and
>> this seems to confuse Xalan a lot. This was a blocker for
>> Ajax-in-CForms as Firefox's parser was failing on error when
>> encountering this namespace.
>>
>> I added a o.a.c.xml.RedundantNamespacesFilter class that filters the
>> output of JXTG to ensure namespaces are not mulitply declared and
>> that empty namespaces scopes are filtered out.
>
>
> Could this be made into a transformer and still used for it's given
> purpose?
>
> Or perhaps wrap it with a transformer?
>
> Seems to be that would make a pretty useful transformer... much of
> what I output as xhtml has redundant namespaces and fails validation.
>
> I've had a little look at the source, and it seems that it would not
> require much work to have that as a transformer.
IMO it shouldn't be made a transformer, but the underlying
NamespaceSupport class should be used in every transformer to handle
start/stop prefix mapping.
I plan to refactor it so that it's easier to use and also to filter out
namespaces a transformer is supposed to consume (e.g. i18n, ft,
xinclude, etc).
Sylvain
--
Sylvain Wallez Anyware Technologies
http://apache.org/~sylvain http://anyware-tech.com
Apache Software Foundation Member Research & Technology Director
Re: JX generates weird NameSpace???
Posted by Ben Pope <be...@gmail.com>.
Sylvain Wallez wrote:
> oceatoon wrote:
>
>> Hi everyone
>> Is anybody aware of such a thing as JX generating a weirds namespaces??
>> <head xmlns:%@$#^@#="%@$#^@#">
>> weird !! and blocking...grrrr
>>
>> This seems to happen only on a cforms / jx mixed page, I tested simple
>> jx is
>> ok.
>>
>>
>
> Fixed. The problem comes from the fact that including macros starts some
> prefix mappings and ends them with no elements inbetween, and this seems
> to confuse Xalan a lot. This was a blocker for Ajax-in-CForms as
> Firefox's parser was failing on error when encountering this namespace.
>
> I added a o.a.c.xml.RedundantNamespacesFilter class that filters the
> output of JXTG to ensure namespaces are not mulitply declared and that
> empty namespaces scopes are filtered out.
Could this be made into a transformer and still used for it's given purpose?
Or perhaps wrap it with a transformer?
Seems to be that would make a pretty useful transformer... much of what
I output as xhtml has redundant namespaces and fails validation.
I've had a little look at the source, and it seems that it would not
require much work to have that as a transformer.
I did give it a go, but didn't know what to put in the setup method and
wound up with a NPE.
Ben