[xquery-talk] changing structure based on input value

Dmitri.Colebatch at toyota.com.au Dmitri.Colebatch at toyota.com.au
Thu Jul 31 18:24:30 PDT 2003


hey all,

firstly, I'm new to this list, so if this has been discussed already could
someone please point me at the appropriate archive (I did have a short look
at them with no joy)..

I want to select one document or another based on the content of my input
document... I think this is better explained by example:

given

      <foobar>
            <abc>4</abc>
            <xyz>blah</xyz>
      </foobar>

I want to create

      <myoutput>
            <value>blah</value>
      <myoutput>

but based on

      <foobar>
            <abc>5</abc>
            <xyz>blah</xyz>
      </foobar>

I want to create

      <somethingelse>
            <value>blah</value>
      </somethingelse>

Does this make sense?  I'm not sure if its possible or not.  Any pointers
would be appreciated.  The closest thing I can think of is to use xpath to
check the value, but I'm not sure how to completely change the structure
based on that...

cheers
dim

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                               DISCLAIMER
* This email and any attachment may contain confidential information.
  If you are not the intended recipient you are not authorised to copy
  or disclose all or any part of it without the prior written consent
  of Toyota.
* Opinions expressed in this email and any attachment are those of the
  sender and not necessarily the opinions of Toyota.
* Please scan this email and any attachment for viruses.  Toyota does
  not accept any responsibility for problems caused by viruses, whether
  it is Toyota's fault or not.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -




More information about the talk mailing list