Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » JET2 - How to get the content of a text node
JET2 - How to get the content of a text node [message #6344] Wed, 21 March 2007 10:39 Go to next message
Eclipse User
Originally posted by: vincent.lg.voila.fr

Hi everyone,

In my JET2 plugin, I would like to get the content of a text node. Say I
parse this xml file :

<root>
<node> text node </node>
</root>

My question is probably stupid but how can I retrieve the value " text
node " ? I tried with the xpath function text() which in xslt is done for
that, but it can't helps.
How can I do that ?

I'm also interested in getting tags of kind "xsi:type" but it fails. Do I
have to attach a specific modelLoader, modelSchema or something like that ?

Many thanks,
Vincent.
Re: JET2 - How to get the content of a text node [message #6404 is a reply to message #6344] Wed, 21 March 2007 10:58 Go to previous message
Paul Elder is currently offline Paul Elder
Messages: 849
Registered: July 2009
Senior Member
Vincent:

The XPath expression /root/node will return the content of 'node', so

<c:get select="/root/node"/>

will write it to a template output.

Paul

"Vincent" <vincent.lg@voila.fr> wrote in message
news:a0f4f9d909ee2b355751dc7a9e8c528b$1@www.eclipse.org...
> Hi everyone,
> In my JET2 plugin, I would like to get the content of a text node. Say I
> parse this xml file :
> <root>
> <node> text node </node>
> </root>
>
> My question is probably stupid but how can I retrieve the value " text
> node " ? I tried with the xpath function text() which in xslt is done for
> that, but it can't helps.
> How can I do that ?
>
> I'm also interested in getting tags of kind "xsi:type" but it fails. Do I
> have to attach a specific modelLoader, modelSchema or something like that
> ?
>
> Many thanks, Vincent.
>
Previous Topic:JET2 - declaring custom tags
Next Topic:JET2 transformation project with multiple transformations
Goto Forum:
  


Current Time: Wed Apr 16 18:52:25 EDT 2014

Powered by FUDForum. Page generated in 0.05090 seconds