StephenGunn
Programmer
Using XSLT, is it possible to match on values between disparate xml nodes and to combine related data in new XML output?
Objective: To update xml output from Teamcenter, using XSLT, to join together information that is directly related but from separate nodes. So that it is feasible to preview the xml data in an xml reader, to view the data logically grouped together. I give an example below of what I'm asking: The ask is if it's possible.
Note all the xml from Siemen's tool is in something called pmlxml. Ignore that fact and just think of it as standard xml format, albeit it's all attribute based, no elements whatsoever.
Example; I can provide real pmlxml as an example if wanted, but below is representative of the ask and simplifies what I'm trying to ascertain: If possible or not:
<xml>
<topNode>
<Part ID="2", DieType="Draw", Name="Cross Piece">
<NodeA ID="1", yada="red", yada="1.444" />
</Part>
<Part ID="3", DieType="Trim", Name="Support">
<NodeA ID="1", yada="red", yada="1.444" />
</Part>
<Brick ID="4", PartID="2", Name="Layers">
<brickfurthernode id="2", yada = "value" />
</Brick
</topNode>
Run through XSLT… and based on pk and fk relationship, such as on <part ID = "2">, combine information as thus:
<xml>
<Brick ID="4", PartID="2", PartName = "Cross Piece" Name="Layers">
</Brick
Objective: To update xml output from Teamcenter, using XSLT, to join together information that is directly related but from separate nodes. So that it is feasible to preview the xml data in an xml reader, to view the data logically grouped together. I give an example below of what I'm asking: The ask is if it's possible.
Note all the xml from Siemen's tool is in something called pmlxml. Ignore that fact and just think of it as standard xml format, albeit it's all attribute based, no elements whatsoever.
Example; I can provide real pmlxml as an example if wanted, but below is representative of the ask and simplifies what I'm trying to ascertain: If possible or not:
<xml>
<topNode>
<Part ID="2", DieType="Draw", Name="Cross Piece">
<NodeA ID="1", yada="red", yada="1.444" />
</Part>
<Part ID="3", DieType="Trim", Name="Support">
<NodeA ID="1", yada="red", yada="1.444" />
</Part>
<Brick ID="4", PartID="2", Name="Layers">
<brickfurthernode id="2", yada = "value" />
</Brick
</topNode>
Run through XSLT… and based on pk and fk relationship, such as on <part ID = "2">, combine information as thus:
<xml>
<Brick ID="4", PartID="2", PartName = "Cross Piece" Name="Layers">
</Brick