Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xml MarkLogic'的文档;s xdmp:quote没有选项的示例_Xml_Xml Serialization_Marklogic - Fatal编程技术网

Xml MarkLogic'的文档;s xdmp:quote没有选项的示例

Xml MarkLogic'的文档;s xdmp:quote没有选项的示例,xml,xml-serialization,marklogic,Xml,Xml Serialization,Marklogic,我希望在不包含XML的情况下执行以下操作: xdmp:quote(fn:doc($uri)/*) 当时的文件不是很清楚。选项参数应如何格式化?尝试使用以下选项参数: let $options := <options xmlns="xdmp:quote"> <indent>no</indent> </options> return xdmp:quote(fn:doc($uri)/*, $options) let$选项:= 不 返

我希望在不包含XML的情况下执行以下操作:

xdmp:quote(fn:doc($uri)/*)

当时的文件不是很清楚。选项参数应如何格式化?

尝试使用以下选项参数:

let $options :=
  <options xmlns="xdmp:quote">
    <indent>no</indent>
  </options>

return xdmp:quote(fn:doc($uri)/*, $options)
let$选项:=
不
返回xdmp:quote(fn:doc($uri)/*,$options)
功能的文档中列出了


有关所有选项的完整列表,您可以在/MarkLogic/Config目录的安装区域中找到quote.xsd文件。

它相对简单,与其他命令(如xdmp:http get和xdmp:eval)中的使用方式没有什么不同:

  xdmp:quote(
    $xml,
    <options xmlns="xdmp:quote">
      <omit-xml-declaration>yes</omit-xml-declaration>
      <indent>no</indent>
      <indent-untyped>no</indent-untyped>
    </options>
  )
xdmp:quote(
$xml,
对
不
不
)
注意,这不会去除XML中存在的空白。要消除这种情况,可以使用良好的旧xsl:strip空间:

xdmp:quote(
  xdmp:xslt-eval(
    <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="#all">

      <xsl:output indent="no" omit-xml-declaration="yes"/>
      <xsl:strip-space elements="*"/>

      <xsl:template match="@*|node()">
        <xsl:copy>
          <xsl:apply-templates select="@*|node()"/>
        </xsl:copy>
      </xsl:template>

   </xsl:stylesheet>,
   $xml
 )
xdmp:quote(
xdmp:xslt-eval(
,
$xml
)
)


谢谢大家!!成功了。它应该在文档中作为示例。关于如何使用选项的文档不完整。没有提到名称空间。应该有更多关于如何使用选项元素的示例。