Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » XPATH attribute and namespace issue(XPATH and searching for attribute in other namespace)
XPATH attribute and namespace issue [message #691496] Fri, 01 July 2011 15:14
jbruewer  is currently offline jbruewer Friend
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
Previous Topic:[EXTEND] and uml metamodel
Next Topic:Error while applying MARTE Profile
Goto Forum:
  


Current Time: Sat Apr 20 03:41:58 GMT 2024

Powered by FUDForum. Page generated in 0.04420 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top