
March 30th, 2004, 08:56 AM
|
|
Registered User
|
|
Join Date: Mar 2004
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Applying template to XPath expression in XML Attribute
I am trying to use an XSL transformation on an XML document of the following form:
Code:
<?xml version="1.0" encoding="ASCII"?>
<uk.ac.ic.doc.part.partInfomodel:PARTInformationModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:uk.ac.ic.doc.part.partInfomodel="http:///uk/ac/ic/doc/part/partInfomodel.ecore" modelName="DSE Information Model">
<managedTypes managedObjectTypeName="printer">
<attributes attrName="status" attrType="String" attrValue="idle"/>
<operations managedOpName="printDoc">
<parameters varName="documentName" varType="String"/>
<parameters varName="documentSize" varType="Integer"/>
</operations>
</managedTypes>
<behaviourModels>
<states stateName="SS1" model="//@behaviourModels.0"/>
<states stateName="SS2" model="//@behaviourModels.0">
<stateConstraints objectRefName="typePrinter" attrVarName="status" value="idle"/>
</states>
<transitions transitionLabel="TT1" transitionOp="//@managedTypes.0/@operations.0" toState="//@behaviourModels.1/@states.1" fromState="//@behaviourModels.1/@states.0"/>
</behaviourModels>
</uk.ac.ic.doc.part.partInfomodel:PARTInformationModel>
Now, when processing the <transitions> tag in the XSLT, I would like to make use of information in the nodes referenced by the XPath expressions in the @transitionOp, @fromState and @toState attributes - ideally I would like to force the processor to apply the templates defined for those nodes.
Is there any way to do this? If not, could someone suggest a better way of cross-referencing elements in the XML document such that the cross-references can be processed using XSLT?
Thanks in advance for any help!
Cheers,
- Arosha
|