Andy-

Based on the snippet you list here, I don't think you NEED to
transform the document (you may find it makes your life easier, but it
may not be required).  I think you'll want to look at the following
HOWTO:

  http://castor.org/how-to-use-references-in-xml.html

Let us know if you have more questions.

Stephen


On 12/11/06, Andy Buckley <[EMAIL PROTECTED]> wrote:

Hi,

I'm trying to use Castor to read and build some XML files which aren't strictly
hierarchical, and I think that to do this I need to transform the document
into a strict hierarchy for unmarshalling and from the strict hierarchy when
marshalling. Here's an example:

<axis>
  <points>
    <point pointId="1" ... />
    <point pointId="2" ... />
    ...
  </points>
  <pointerrors>
    <pointerror pointId="1" ... />
    <pointerror pointId="2" ... />
    ...
  </pointerrors>
</axis>

so, rather than having <pointerror> be a child element of <point>, the relation
is done by matching the pointId attributes. Can this be done directly by
Castor, or is this something where I need to apply some transformations, either
XSLT or otherwise?

Andy

PS. I've got several questions related to this, but will send them as separate
emails. Thanks for your time and sorry to bombard the list!

--
Andy Buckley: CEDAR @ IPPP, Durham
Work: www.cedar.ac.uk
www.insectnation.org

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email



---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email

Reply via email to