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

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"/>

i wasn't able to parse the "xsi:type"="reststructure:PrimaryResourceType" by usind:

for example.

Can anyone share a proposal?
Need urgent support

Best regards
Previous Topic:[EXTEND] and uml metamodel
Next Topic:Error while applying MARTE Profile
Goto Forum:

Current Time: Sat Dec 02 08:30:21 GMT 2023

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

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

Back to the top