XSLT to produce text

Poster Content
nk4um User
Posts: 102
September 19, 2013 09:55serialisation issue with the Xalan accessor I think

Hi Radu,

I remember facing a similar issue a long while ago (the project stalled after my return from holidays, so I did not follow up after) My conclusion at that point was that the active:xslt doesn't seem to be able to serialise as text. At least some serialisation settings in the xsl:output are ignored. Chris' response helped me to set serialisation for active:xslt2. So I decided to use xslt2 and use the serialisation settings outside the XSLT to get around that Here is a reference to the original thread. Maybe it helps: forum entry good luck Geert

Posted by Chris Cormack (View)
Hi Radu,

I'd suggest trying active:xslt2 (via the xml-saxon package). I seem to recall that it works, but I haven't checked.

Let me know if that doesn't work, and I'll take a more thorough look.

-cc

Like · Post Reply
nk4um User
Posts: 177
August 31, 2013 19:35

Hi Radu,

I'd suggest trying active:xslt2 (via the xml-saxon package). I seem to recall that it works, but I haven't checked.

Let me know if that doesn't work, and I'll take a more thorough look.

-cc

Like · Post Reply
nk4um User
Posts: 37
August 28, 2013 10:14XSLT to produce text

Hi all!

Just tried to produce some text from some XML representation, and failed do to it.

I produced a minimal example

<request>
  <identifier>active:xslt&lt;/identifier&gt;
  <argumentname="operand">
    <literaltype="xml">
      <patients>
        <patient>
          <id>1&lt;/id&gt;
          <name>First one&lt;/name&gt;
        &lt;/patient&gt;
      &lt;/patients&gt;
    &lt;/literal&gt;
  &lt;/argument&gt;
  <argumentname="operator">
    <literaltype="xml">
      <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
        <xsl:outputmethod="text" /&gt;
        <xsl:templatematch="/">
          <xsl:text>WORKS&lt;/xsl:text&gt;
        &lt;/xsl:template&gt;
      &lt;/xsl:stylesheet&gt;
    &lt;/literal&gt;
  &lt;/argument&gt;
&lt;/request&gt;

and the result is an error

 HIERARCHY_REQUEST_ERR: An attempt was made to insert a node where is not permitted.

I tried with version 1.0 but the same (except that the line and column were 0, 0 for this case).

Please advice,

Radu

Like · Post Reply