Hi Gary,

You can try adding this template to one of your stylesheets:

<xsl:template match="value" xmlns:xdmp="http://marklogic.com/xdmp";>
<xsl:copy>
<xsl:sequence select="@*"/>
<xsl:sequence select="xdmp:unquote(.)"/>
</xsl:copy>
</xsl:template>

Kind regards,
Geert

From: Gary Larsen <[email protected]<mailto:[email protected]>>
Reply-To: MarkLogic Developer Discussion 
<[email protected]<mailto:[email protected]>>
Date: Tuesday, June 30, 2015 at 7:36 PM
To: 'MarkLogic Developer Discussion' 
<[email protected]<mailto:[email protected]>>
Subject: Re: [MarkLogic Dev General] Convert element text to node in XSL

Thanks Rob,

Is there something I can use in XSL?   Although maybe I can preprocess the 
document before sending to the stylesheet,

Gary Larsen
Envisn Inc.
508 259-6465

From: 
[email protected]<mailto:[email protected]>
 [mailto:[email protected]] On Behalf Of Rob Szkutak
Sent: Tuesday, June 30, 2015 1:29 PM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] Convert element text to node in XSL

Here you go:

xquery version "1.0-ml";

let $doc :=
<advancedSettings>
<value>&lt;settings&gt;&lt;setting 
name="asv.preview.maxRows"&gt;450&lt;/setting&gt;&lt;/settings&gt;</value>
</advancedSettings>

let $convert := xdmp:unquote(xdmp:url-decode($doc/value/text()))

return
  $convert//setting


Best,
Rob

Rob Szkutak
Associate Consultant
MarkLogic Corporation
[email protected]<mailto:[email protected]>
Cell +1.716.562.8464
www.marklogic.com<http://www.marklogic.com>

________________________________
From:[email protected]<mailto:[email protected]>
 
[[email protected]<mailto:[email protected]>]
 on behalf of Gary Larsen 
[[email protected]<mailto:[email protected]>]
Sent: Tuesday, June 30, 2015 12:27 PM
To: 'General MarkLogic Developer Discussion'
Subject: [MarkLogic Dev General] Convert element text to node in XSL
Hope this isn’t too off topic.  In an XML document the value element contains 
and encoded XML string. I would like to parse this to a node in XSL for further 
processing.

<advancedSettings>
<value>&lt;settings&gt;&lt;setting 
name="asv.preview.maxRows"&gt;450&lt;/setting&gt;&lt;/settings&gt;</value>
</advancedSettings>

Is this possible?

Thanks,
Gary

_______________________________________________
General mailing list
[email protected]
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to