Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » Unable to Parse XML EMF Document
Unable to Parse XML EMF Document [message #52079] Thu, 16 October 2008 13:12 Go to next message
Kamesh Sampath is currently offline Kamesh Sampath
Messages: 213
Registered: July 2009
Senior Member
Hi,

I am facing a peculiar problem,

Platform : Eclipse Ganymede SR1

I have a serialized EMF model - the serialization type is XML . I am
trying to generate the code from the Model to my surprise the parsing is
not happening other than for root element

<rootns:root xmlns:rootns="http://www.example.org">
.......
<rootns:child>
<rootns:text>blahblahblah</rootns:text>
</rootns:child>
.....
</rootns:root>

I am setting the variable in main.jet as follows
<c:setVariable var="page" select="/*"/> and passing the same to child.jet
<c:include template="templates/child.jet" passVariables="page"/>

child.jet

I am setting a value <c:setVariable var="child" select="$page/child"/>

When i put the tag : <c:get select="$child/text"/>

am getting XPath not returned the result error.


I have followed the JET documentation to set the transform properties that
are required for parsing the EMF XML

Can anyone throw some light in to this and let me know what could be wrong
?

Thanks,
Kamesh
Re: Unable to Parse XML EMF Document [message #52183 is a reply to message #52079] Mon, 20 October 2008 07:08 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 25917
Registered: July 2009
Senior Member
Kamesh,

If JET is providing full proper XPath support then I think you need to
namespace qualify the "text" element properly. I.e., it's "rootns:text"
not just "text"...


Kamesh Sampath wrote:
> Hi,
>
> I am facing a peculiar problem,
>
> Platform : Eclipse Ganymede SR1
>
> I have a serialized EMF model - the serialization type is XML . I am
> trying to generate the code from the Model to my surprise the parsing
> is not happening other than for root element
> <rootns:root xmlns:rootns="http://www.example.org">
> ....... <rootns:child>
> <rootns:text>blahblahblah</rootns:text>
> </rootns:child>
> .....
> </rootns:root>
>
> I am setting the variable in main.jet as follows <c:setVariable
> var="page" select="/*"/> and passing the same to child.jet <c:include
> template="templates/child.jet" passVariables="page"/>
>
> child.jet
>
> I am setting a value <c:setVariable var="child" select="$page/child"/>
>
> When i put the tag : <c:get select="$child/text"/>
>
> am getting XPath not returned the result error.
>
> I have followed the JET documentation to set the transform properties
> that are required for parsing the EMF XML
>
> Can anyone throw some light in to this and let me know what could be
> wrong ?
>
> Thanks,
> Kamesh
>
>
>
Re: Unable to Parse XML EMF Document [message #52286 is a reply to message #52079] Wed, 22 October 2008 16:45 Go to previous message
Paul Elder is currently offline Paul Elder
Messages: 849
Registered: July 2009
Senior Member
Kamesh:

This appears to be a regression from 0.9.0. I have tested with latest 0.9.2
M build, it is fixed again.

You can download it from here:

http://www.eclipse.org/modeling/m2t/downloads/?showAll=1& ;hlbuild=M200810010919&project=jet#M200810010919

Or, you can point to this update site:

http://download.eclipse.org/modeling/m2t/updates/interim/

I hadn't realized that this regression was this pervassive. I may just
release 0.9.2 early --- I'll let everyone know.

Paul
Previous Topic:"Internal Error" when deploying a JET transform
Next Topic:When will an Tag-Action be executed
Goto Forum:
  


Current Time: Wed Jul 23 22:38:19 EDT 2014

Powered by FUDForum. Page generated in 0.01788 seconds