Is this impossible via XSL?

Discussion in 'XML' started by kbozek@yahoo.com, Jun 25, 2007.

  1. Guest

    Given this XML segment - Note it is a representation of concept of the
    data I am using.

    <?xml version="1.0" encoding="UTF-8"?>
    <root>
    <car>
    <CarInfo vin = "4FL200212345">
    <Owner>J. P. Morgan</Owner>
    </CarInfo>
    </car >

    <car>
    <CarInfo vin = "3CL200212345">
    <Owner>J.P. Thompson</Owner>
    </CarInfo>
    </car >

    <carSpecifics vin = "4FL200212345">
    <CarMake xrefId = "XREF12345">
    <Color>Red</Color>
    <Style>Sedan</Style>
    </CarMake>
    </carSpecifics>

    <carSpecifics vin = "3CL200212345">
    <CarMake xrefId = "XREF67890">
    <Color>Red</Color>
    <Style>Sedan</Style>
    </CarMake>
    </carSpecifics>

    <CarXref xrefId = "XREF12345" >
    <Incident>Friday Crash</Incident>
    </CarXref>

    <CarXref xrefId = "XREF67890" >
    <Incident>Sat Crash</Incident>
    </CarXref>

    </root>

    I need to walk all car nodes. With the goal of outputting only the
    CarXref\Incident node.
    Per each attribute VIN, I need to obtain the carSpecifics
    \CarMake@xrefId. From that I need to output the CarXref\Incident node
    associated with a xrefId. For example. CarInfo vin = "4FL200212345
    matches to carSpecifics vin = "4FL200212345" which has an CarMake
    xrefId = "XREF67890" which in turn has CarXref xrefId = "XREF12345"
    with contents of CarXref\Incident Friday Crash. I want to output
    this.

    I know this sounds insane, but the XML file I have been given is in
    this structure and I have to transform only parts of its contents.
    I am beginning to believe that I have to use a regular XML parser as I
    cannot determine how XSL would let me do this. I can get CarMake
    xrefId yet I have to output text via the xsl-value of and I cannot get
    to the final node.
     
    , Jun 25, 2007
    #1
    1. Advertising

  2. No, it is not impossible. Rather standard sort of selection task,
    actually...


    --
    () ASCII Ribbon Campaign | Joe Kesselman
    /\ Stamp out HTML e-mail! | System architexture and kinetic poetry
     
    Joe Kesselman, Jun 26, 2007
    #2
    1. Advertising

  3. On Jun 26, 12:27 pm, Joe Kesselman <> wrote:
    > No, it is not impossible. Rather standard sort of selection task,
    > actually...
    >
    > --
    > () ASCII Ribbon Campaign | Joe Kesselman
    > /\ Stamp out HTML e-mail! | System architexture and kinetic poetry



    http://www.trade-suppliers.com
     
    tradesuppliers, Jun 26, 2007
    #3
  4. Not sure why the spam was posted in response to my comment, but I want
    to explicitly disavow any knowledge or support therefor.

    --
    () ASCII Ribbon Campaign | Joe Kesselman
    /\ Stamp out HTML e-mail! | System architexture and kinetic poetry
     
    Joe Kesselman, Jun 26, 2007
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kevin Flood
    Replies:
    0
    Views:
    1,034
    Kevin Flood
    Sep 8, 2004
  2. Kevin Flood
    Replies:
    1
    Views:
    2,771
    Kevin Flood
    Sep 13, 2004
  3. Klaus Friese
    Replies:
    0
    Views:
    481
    Klaus Friese
    Nov 22, 2004
  4. Replies:
    1
    Views:
    3,637
    A. Bolmarcich
    May 27, 2005
  5. Replies:
    5
    Views:
    275
    Michele Dondi
    Jun 30, 2006
Loading...

Share This Page