XPATH attribute and namespace issue [message #691496] |
Fri, 01 July 2011 15:14 |
jbruewer Messages: 1 Registered: June 2011 |
Junior Member |
|
|
Hi,
for my master thesis i need to write some jet templates for parsing a model that contains multiple namespaces.
Some of defined attributes of an element in XML are referenced to these foreign namespace. No i recognized that the standard XPath seems not to have the capability of parsing this attribute.
Here a brief example:
<resourceTypes xsi:type="reststructure:PrimaryResourceType" name="Picture">
<resourceelements xsi:type="reststructure:Attribute" name="title" attrType="//@dataTypes.0"/>
<resourceelements xsi:type="reststructure:Attribute" name="description" attrType="//@dataTypes.0"/>
<resourceelements xsi:type="reststructure:Attribute" name="isExcellent" attrType="//@dataTypes.1"/>
<resourceelements xsi:type="reststructure:InternalLink" name="nextPicture" relType="//@relTypes.1" target="//@resourceTypes.0"/>
<resourceelements xsi:type="reststructure:InternalLink" name="previousPicture" relType="//@relTypes.2" target="//@resourceTypes.0"/>
<resourceelements xsi:type="reststructure:InternalLink" name="data" relType="//@relTypes.3" target="//@resourceTypes.4"/>
<resourceelements xsi:type="reststructure:InternalLink" name="containingAlbum" relType="//@relTypes.4" target="//@resourceTypes.1"/>
</resourceTypes>
i wasn't able to parse the "xsi:type"="reststructure:PrimaryResourceType" by usind:
/.../resourcesTypes/@*[local-name()='type']
for example.
Can anyone share a proposal?
Need urgent support
Best regards
Joerg
|
|
|
Powered by
FUDForum. Page generated in 0.03530 seconds