Hi Alain, thanks for the link,

I've been studying the tests referred in the post at 
http://blackmesatech.com/2012/07/testcase/transform/index.xml

Definitively it's a must-read in order to use XSLTForms and XSLT, and what I 
want to achieve is done in one of the test cases (s-bravo with xray.xsl).

Now, the action should be this:

<xf:setnode  ev:event="DOMActivate"  ref="instance('xform')/self::html" 
outer="transform(string(instance('source')/self::string/text()),'xforms/x2xf.xsl')"
 />

Although I copied it directly from the source code that works on the Black Mesa 
Tech page, it doesn't work for me.

I tried to use the same revision (1.0RC vs r565 included with eXist) with no 
success.

Tomorrow I begin a trip, so I'll come back to the it next week with a fresher 
mind.

Thanks again for all the help,


-          Bill


De: Alain Couthures [mailto:[email protected]]
Enviado el: martes, 22 de octubre de 2013 15:38
Para: William Velasquez
CC: [email protected]
Asunto: Re: [Xsltforms-support] Parsing XML from textarea

Hi Bill,

Because of dependencies, it is much easier to define an action for parsing than 
a function.

Please have a look at this thread: 
http://sourceforge.net/mailarchive/forum.php?thread_name=5B968F6E-5966-4E5C-8C93-43E26433FDDD%40blackmesatech.com&forum_name=xsltforms-support

This is still an experimental feature and the setnode action should only be 
used as the last action in a group of actions for effective refresh.

-Alain

Le 21/10/2013 19:24, William Velasquez a écrit :
Hi everybody,

I'm building an XForms where the user could be able to paste XML code in a 
textarea and then apply an XSL transformation to the pasted code.

In order to be able to do it, I tried two alternatives with no success:


1.       Parse the XML code and store it in an instance (there is no function 
to parse xml text to instances)

2.       Directly apply the transformation to the XML code and store the result 
in an instance (the transform() function only accepts nodes as input, not plain 
text.

The missing piece is how to parse the content of the textarea. XPath 3.0 
defines serialize()to convert an instance to text and  parse-xml() to do the 
reverse process.

XSLTForms implements the serialize() function, but the parse-xml() is not 
available.

Some body knows a shortcut to do this?

Thanks in advance,


William David Velásquez
Director de Investigación y Desarrollo
Visión Tecnológica S.A.S.
www.visiontecnologica.com<http://www.visiontecnologica.com>
Follow me @williamda




------------------------------------------------------------------------------

October Webinars: Code for Performance

Free Intel webinars can help you accelerate application performance.

Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from

the latest Intel processors and coprocessors. See abstracts and register >

http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk




_______________________________________________

Xsltforms-support mailing list

[email protected]<mailto:[email protected]>

https://lists.sourceforge.net/lists/listinfo/xsltforms-support

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Xsltforms-support mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xsltforms-support

Reply via email to