cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aki Yoshida (JIRA)" <>
Subject [jira] [Commented] (CXF-3681) Transform feature can loop endless in combination with PartialXMLStreamReader
Date Mon, 01 Aug 2011 11:20:10 GMT


Aki Yoshida commented on CXF-3681:

Hi Sergey,
glad to see you are back.

I submitted my version with some new features we discussed. I left out
the attributes-transformation feature, as I wanted to discuss with you
about it.

InTransformReader takes the inAttributes map that allows you to
translate/drop some attributes.
However, this needs to be worked out. Currently, we can use
key="aname1" value="aname2" to change attribute name form aname1 aname2 and
key="aname1" value="" to delete attribute aname1.

But this operaiton is limited for the global context and not for the
local element context (i.e., we can't refer to an attribute within a
specific element).

So we need a way to refer to an attribute within an element. But I am
not sure which syntax to use.

One approach would be to use the xpath syntax.
for example,
to change attribute aname1 within element ename to aname2,
how should we set inAttributes map?
1. key="ename/@aname1" value="aname2".
2. key="ename/@aname1" value="@aname2"
3. key="ename/@aname1" value="ename/@aname2"
4. others?

I think I am for 1 or 2. Option 3 can imply the potential move of the
attribute to another element, so I don't like it, as it complicates
the logic too much.

The advantage of option 2 is that we can reuse inElements map and do
not need inAttributesMap. This approach can be extended to do
transformation from an element to an attribute or from an attribute to
an element. That makes it more complicated but it's kind of cute.

For working on attributes in the global context, we can omit the
element part in this case.
key="@aname1" ...

Once we decide on this syntax, we can derive an analogue syntax for
the attribute-append as in the element-append.

regards, aki

> Transform feature can loop endless in combination with PartialXMLStreamReader
> -----------------------------------------------------------------------------
>                 Key: CXF-3681
>                 URL:
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.4.1
>         Environment: WinXP, Java SDK 1.6.0_26
>            Reporter: Andreas Kuhtz
>            Assignee: Aki Yoshida
>             Fix For: 2.4.2, 2.5
>         Attachments: cxf-3681-patch.diff, cxf-3681-patch2.diff, cxf-3681-patch3.diff,
cxf-3681-patch5.diff, cxf-3681-patch6.diff
> A bug in the InTransformReader can cause an endless loop in combination with PartialXMLStreamReader.
The attached patch contains the fix and more tests for InTransformReader but currently none
for the combination with PartialXMLStreamReader.
> See also

This message is automatically generated by JIRA.
For more information on JIRA, see:


View raw message