# Error in CAttribute.java?

**URL:** <https://discourse.openehr.org/t/error-in-cattribute-java/12397>\
**Category:** Reference Implementation: Java (archive)\
**Created:** [17 May 2007 08:40 UTC](https://discourse.openehr.org/t/error-in-cattribute-java/12397 "2007-05-17T08:40:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://discourse.openehr.org/uploads/default/original/2X/f/f0a1dedb20c42747bddcafd6c7df9db5f34f003c.svg) [@system](https://discourse.openehr.org/u/system)\
**Post date:** [17 May 2007 08:40 UTC](https://discourse.openehr.org/t/error-in-cattribute-java/12397/1 "2007-05-17T08:40:39Z")

</div>

Hi Rong, I believe there is an error in CAttribute.java in the method

public String parentNodePath() and also in the method which depends on  
this: childNodePathBase()

When I ask the parentNodePath of the value of an ELEMENT, I get this  
(missing bracket)

parentNodePath:/data[at0001]/items[at0005]/items[at0007  
childNodePathBase:/data[at0001]/items[at0005]/items[at0007/value

Can you please give a reply to this.

Thanks  
Kind Regards  
Bert Verhees

---

<div class="post-metadata">

**Author:** ![system](https://discourse.openehr.org/uploads/default/original/2X/f/f0a1dedb20c42747bddcafd6c7df9db5f34f003c.svg) [@system](https://discourse.openehr.org/u/system)\
**Post date:** [21 May 2007 12:44 UTC](https://discourse.openehr.org/t/error-in-cattribute-java/12397/2 "2007-05-21T12:44:46Z")

</div>

Hi Bert,

Can you provide a minimum testcase that reproduces this issue? Or the archetype that you have problem with. Thanks!

Cheers,  
Rong

---

<div class="post-metadata">

**Author:** ![system](https://discourse.openehr.org/uploads/default/original/2X/f/f0a1dedb20c42747bddcafd6c7df9db5f34f003c.svg) [@system](https://discourse.openehr.org/u/system)\
**Post date:** [21 May 2007 13:00 UTC](https://discourse.openehr.org/t/error-in-cattribute-java/12397/3 "2007-05-21T13:00:15Z")

</div>

Rong Chen schreef:

> Hi Bert,
> 
> Can you provide a minimum testcase that reproduces this issue? Or the archetype that you have problem with. Thanks!
> 
> Cheers,  
> Rong

Thanks, Rong, for your attention, this archetype (attached) has the problem, both example lines (below) come from this archetype.  
I don't think it is hard to write a simple testcase.

I can be possible that it is my problem, because I did not yet completely move to 1.0.1, but on the other hand, that code in CAttribute hasn't changed since 2005.

regards  
Bert

> **(attachments)**
>
> [openEHR-EHR-EVALUATION.goal.v1.adl](https://discourse.openehr.org/404) (3.72 KB)

---

<div class="post-metadata">

**Author:** ![system](https://discourse.openehr.org/uploads/default/original/2X/f/f0a1dedb20c42747bddcafd6c7df9db5f34f003c.svg) [@system](https://discourse.openehr.org/u/system)\
**Post date:** [29 May 2007 21:07 UTC](https://discourse.openehr.org/t/error-in-cattribute-java/12397/4 "2007-05-29T21:07:20Z")

</div>

Hi Bert,

It’s caused by mismatch of path handling between the parser and the class CAttribute. The path logic in CAttribute is out-of-date and is now fixed on the Trunk. Thanks for pointing it out.

Regards,  
Rong
