Is this impossible via XSL?



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.

.



Relevant Pages

  • Re: modeling either/or relationship...
    ... > vehicle_type and a door count, and vin is a primary key for every car. ... Given that every vehicle has both a vehicle type and a door count, ...
    (comp.databases.theory)
  • Re: What happens after 2^32 autonum keys are exhausted?
    ... using the same dealership stock number? ... if you see a car advertised at a specific dealer in New York would ... A VIN identifies one particular car. ...
    (comp.databases)
  • Re: What happens after 2^32 autonum keys are exhausted?
    ... Whether you know of that encoding is irrelevant ... be led to one of the car I am interested in. ... It depends on how the dealership has set ... but my point is it still needs a look up in the same way that the vin needs a look up; ...
    (comp.databases)
  • Re: Selecting data that matches all conditions
    ... than one owner, you would have schema more like this: ... NOT NULL PRIMARY KEY, ... vin CHARNOT NULL ... That is I want the name BMW when I ask for the car owned by ...
    (microsoft.public.sqlserver.programming)
  • Re: etched VIN and others
    ... > that comes with it seems to be the one for all Camry models. ... The manual said The car has etched VIN on the windshield, ... I only see the mark "Toyota Glass" and some irregular numbers ... So does my car have etched VIN? ...
    (alt.autos.toyota)