XSLT 转换未提供正确的输出

2023-12-28

我的 XSLT 转换遇到了一些小问题。

我有以下 XSLT;

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"><!-- removes the unrelated elements -->
   <xsl:template match="@* | node()">
      <xsl:copy>
         <xsl:apply-templates select="@* | node()"/>
      </xsl:copy>
   </xsl:template>
   <xsl:template match="master_version[not(ORDER = //order/ORDERPK)]"/>
   <xsl:template match="press_section[not(ORDER = //order/ORDERPK)]"/>
   <xsl:template match="version[not(ORDER = //order/ORDERPK)]"/>
   <xsl:template match="task_info_press_section[not(ORDER = //order/ORDERPK)]"/>
   <xsl:template match="task_info_post_press[not(ORDER = //order/ORDERPK)]"/>
   <xsl:template match="post_press_version[not(ORDER = //order/ORDERPK)]"/>
   <!-- removes specified nodes from all elements -->
   <xsl:template match="@*|node()">
      <xsl:copy>
         <xsl:apply-templates select="@*|node()"/>
      </xsl:copy>
   </xsl:template>
   <xsl:template match="ORDER"/>
   <xsl:template match="ORDERPK"/>
   <xsl:template match="PRESS_x0020_SECTION"/>
   <xsl:template match="POST_x0020_PRESS"/>
   <!-- Creates attributes against the ORDER element -->
   <xsl:strip-space elements="*"/>
   <xsl:output method="xml" indent="yes"/>
   <xsl:template match="@*|node()">
      <xsl:copy>
         <xsl:apply-templates select="@*|node()"/>
      </xsl:copy>
   </xsl:template>
   <xsl:template match="order">
      <order job_id="{job_id}" site_code="{site_code}" replace="{replace}">
         <xsl:apply-templates/>
      </order>
   </xsl:template>
   <xsl:template match="job_id | site_code | replace | master_version"/>
   <!-- identity transform -->
   <xsl:template match="@*|node()">
      <xsl:copy>
         <xsl:apply-templates select="@*|node()"/>
      </xsl:copy>
   </xsl:template>
   <xsl:template match="order">
      <order job_id="{@job_id}" site_code="{@site_code}" replace="{Replace}">
         <xsl:apply-templates select="node()"/>
         <xsl:copy-of select="../master_version"/>
      </order>
   </xsl:template>
   <xsl:template match="Replace | master_version"/>
   <!-- renames element to specified name -->
   <xsl:template match="@*|node()">
      <xsl:copy>
         <xsl:apply-templates select="@*|node()"/>
      </xsl:copy>
   </xsl:template>
   <xsl:template match="task_info_press_section">
      <xsl:element name="task_info1">
         <xsl:apply-templates/>
      </xsl:element>
   </xsl:template>
   <xsl:template match="@*|node()">
      <xsl:copy>
         <xsl:apply-templates select="@*|node()"/>
      </xsl:copy>
   </xsl:template>
   <xsl:template match="task_info_post_press">
      <xsl:element name="task_info2">
         <xsl:apply-templates/>
      </xsl:element>
   </xsl:template>
</xsl:stylesheet>

这是我转换前的原始 XML;

<?xml version="1.0" encoding="UTF-8"?>
<dataroot xmlns:od="urn:schemas-microsoft-com:officedata" generated="2015-01-07T16:58:58">

<order>
    <ORDERPK>3</ORDERPK>
    <job_id>S026500-1</job_id>
    <site_code>DG</site_code>
    <Replace>true</Replace>
    <job_description>TESTING</job_description>
    <order_qty>20000</order_qty>
    <finishing_style>PB</finishing_style>
    <depth>10</depth>
    <width>8</width>
    <cover_pagination>4</cover_pagination>
    <text_pagination>24</text_pagination>
    <delivery_commence_date>19/12/2014</delivery_commence_date>
    <delivery_complete_date>19/12/2014</delivery_complete_date>
    <job_site>DG</job_site>
    <managing_printer>DG</managing_printer>
    <is_managing_printer>True</is_managing_printer>
</order>
<master_version>
    <ORDER>1</ORDER>
    <version_id></version_id>
    <version_code>COMM</version_code>
    <version_common>true</version_common>
    <version_finished>false</version_finished>
    <version_description>Common</version_description>
    <version_nett_qty>176262</version_nett_qty>
    <version_special_qty>10</version_special_qty>
</master_version>
<master_version>
    <ORDER>2</ORDER>
    <version_code>COMM</version_code>
    <version_common>TRUE</version_common>
    <version_finished>FALSE</version_finished>
    <version_description>Common</version_description>
    <version_nett_qty>1900</version_nett_qty>
    <version_special_qty>0</version_special_qty>
</master_version>
<master_version>
    <ORDER>3</ORDER>
    <version_code>COMM</version_code>
    <version_common>true</version_common>
    <version_finished>false</version_finished>
    <version_description>common</version_description>
    <version_nett_qty>20000</version_nett_qty>
    <version_special_qty>0</version_special_qty>
</master_version>
<press_section>
    <ORDER>1</ORDER>
    <signature_id>001</signature_id>
    <sequence_id>1</sequence_id>
    <sequence_alpha>A</sequence_alpha>
    <description>4ppCover</description>
    <pagination>4</pagination>
    <trim_size>10.875 x 8.375</trim_size>
    <folio></folio>
    <data_format></data_format>
    <data_medium></data_medium>
    <data_due></data_due>
</press_section>
<press_section>
    <ORDER>1</ORDER>
    <signature_id>001</signature_id>
    <sequence_id>2</sequence_id>
    <sequence_alpha>A</sequence_alpha>
    <description>240ppText</description>
    <pagination>240</pagination>
    <trim_size>103875 x 8.25</trim_size>
</press_section>
<press_section>
    <ORDER>2</ORDER>
    <signature_id>001</signature_id>
    <sequence_id>1</sequence_id>
    <sequence_alpha>A</sequence_alpha>
    <description>4pp Cover</description>
    <pagination>4</pagination>
    <trim_size>10 x 8</trim_size>
</press_section>
<press_section>
    <ORDER>2</ORDER>
    <signature_id>001</signature_id>
    <sequence_id>2</sequence_id>
    <sequence_alpha>A</sequence_alpha>
    <description>12pp Text</description>
    <pagination>12</pagination>
    <trim_size>10 x 8</trim_size>
</press_section>
<press_section>
    <ORDER>3</ORDER>
    <signature_id>001</signature_id>
    <sequence_id>0</sequence_id>
    <sequence_alpha>A</sequence_alpha>
    <description>4pp Cover</description>
    <pagination>4</pagination>
    <trim_size>10 x 8</trim_size>
</press_section>
<press_section>
    <ORDER>3</ORDER>
    <signature_id>001</signature_id>
    <sequence_id>1</sequence_id>
    <sequence_alpha>A</sequence_alpha>
    <description>24pp Text</description>
    <pagination>24</pagination>
    <trim_size>10 x 8</trim_size>
</press_section>
<version>
    <ORDER>1</ORDER>
    <version_code>COMM</version_code>
</version>
<version>
    <ORDER>2</ORDER>
    <version_code>COMM</version_code>
</version>
<version>
    <ORDER>3</ORDER>
    <version_code>COMM</version_code>
</version>
<task_info_press_section>
    <ORDER>1</ORDER>
    <PRESS_x0020_SECTION>1</PRESS_x0020_SECTION>
    <task_sub_job_id>SC10268-001COMM</task_sub_job_id>
    <task_seq_id>0</task_seq_id>
    <task_description>4pp NEWS-NEWS COMM</task_description>
    <task_qty_rqd>9636</task_qty_rqd>
    <task_resource_id>1</task_resource_id>
    <task_mr_mins>120</task_mr_mins>
    <task_run_mins>240</task_run_mins>
    <task_run_speed>18000</task_run_speed>
    <task_notes>Task Notes</task_notes>
    <task_no_up>4</task_no_up>
    <task_deadline_date_time></task_deadline_date_time>
    <task_pdt>0.0</task_pdt>
</task_info_press_section>
<task_info_press_section>
    <ORDER>1</ORDER>
    <PRESS_x0020_SECTION>1</PRESS_x0020_SECTION>
    <task_sub_job_id>SC10268-1COMM</task_sub_job_id>
    <task_seq_id>0</task_seq_id>
    <task_description>Perfect Binding</task_description>
    <task_qty_rqd>19402</task_qty_rqd>
    <task_resource_id>1</task_resource_id>
    <task_mr_mins>120</task_mr_mins>
    <task_run_mins>240</task_run_mins>
    <task_run_speed>7500</task_run_speed>
    <task_notes>Task Notes</task_notes>
    <task_no_up>1</task_no_up>
    <task_deadline_date_time></task_deadline_date_time>
    <task_pdt>0.0</task_pdt>
</task_info_press_section>
<task_info_press_section>
    <ORDER>2</ORDER>
    <PRESS_x0020_SECTION>2</PRESS_x0020_SECTION>
    <task_sub_job_id>S019191-9-001COMM</task_sub_job_id>
    <task_seq_id>0</task_seq_id>
    <task_description>4pp Cover</task_description>
    <task_qty_rqd>1900</task_qty_rqd>
    <task_resource_id>2</task_resource_id>
    <task_mr_mins>20</task_mr_mins>
    <task_run_mins>63</task_run_mins>
    <task_run_speed>30</task_run_speed>
    <task_no_up>4</task_no_up>
    <task_pdt>0.0</task_pdt>
</task_info_press_section>
<task_info_press_section>
    <ORDER>2</ORDER>
    <PRESS_x0020_SECTION>2</PRESS_x0020_SECTION>
    <task_sub_job_id>S019191-9-1COMM</task_sub_job_id>
    <task_seq_id>0</task_seq_id>
    <task_description>Perfect Binding</task_description>
    <task_qty_rqd>1900</task_qty_rqd>
    <task_resource_id>2</task_resource_id>
    <task_mr_mins>20</task_mr_mins>
    <task_run_mins>120</task_run_mins>
    <task_run_speed>240</task_run_speed>
    <task_no_up>1</task_no_up>
    <task_pdt>0.0</task_pdt>
</task_info_press_section>
<task_info_press_section>
    <ORDER>3</ORDER>
    <PRESS_x0020_SECTION>3</PRESS_x0020_SECTION>
    <task_sub_job_id>S026500-1-001COMM</task_sub_job_id>
    <task_seq_id>0</task_seq_id>
    <task_description>4ppCover</task_description>
    <task_qty_rqd>20000</task_qty_rqd>
    <task_resource_id>2</task_resource_id>
</task_info_press_section>
<task_info_press_section>
    <ORDER>3</ORDER>
    <PRESS_x0020_SECTION>3</PRESS_x0020_SECTION>
    <task_sub_job_id>S026500-1-1COMM</task_sub_job_id>
    <task_seq_id>1</task_seq_id>
    <task_description>24ppText</task_description>
    <task_qty_rqd>20000</task_qty_rqd>
    <task_resource_id>2</task_resource_id>
</task_info_press_section>
<task_info_post_press>
    <ORDER>1</ORDER>
    <POST_x0020_PRESS>1</POST_x0020_PRESS>
    <task_sub_job_id>SC10268-1COMM</task_sub_job_id>
    <task_seq_id>0</task_seq_id>
    <task_description>Perfect Binding</task_description>
    <task_qty_rqd>19402</task_qty_rqd>
    <task_resource_id>10</task_resource_id>
    <task_mr_mins>120</task_mr_mins>
    <task_run_mins>240</task_run_mins>
    <task_run_speed>7500</task_run_speed>
    <task_notes>Task Notes</task_notes>
    <task_no_up>1</task_no_up>
    <task_deadline_date_time></task_deadline_date_time>
    <task_pdt>0.0</task_pdt>
</task_info_post_press>
<task_info_post_press>
    <ORDER>2</ORDER>
    <POST_x0020_PRESS>2</POST_x0020_PRESS>
    <task_sub_job_id>S019191-9-1COMM</task_sub_job_id>
    <task_seq_id>0</task_seq_id>
    <task_description>Perfect Binding</task_description>
    <task_qty_rqd>1900</task_qty_rqd>
    <task_resource_id>10</task_resource_id>
    <task_mr_mins>20</task_mr_mins>
    <task_run_mins>120</task_run_mins>
    <task_run_speed>240</task_run_speed>
    <task_no_up>1</task_no_up>
    <task_pdt>0.0</task_pdt>
</task_info_post_press>
<task_info_post_press>
    <ORDER>3</ORDER>
    <POST_x0020_PRESS>3</POST_x0020_PRESS>
    <task_sub_job_id>S026500-1-1COMM</task_sub_job_id>
    <task_seq_id>0</task_seq_id>
    <task_description>Perfect Binding</task_description>
    <task_qty_rqd>20000</task_qty_rqd>
    <task_resource_id>10</task_resource_id>
</task_info_post_press>
<post_press_version>
    <ORDER>1</ORDER>
    <post_press_version_op_id>0</post_press_version_op_id>
    <version_code>COMM</version_code>
    <post_press_resource_type>PB</post_press_resource_type>
</post_press_version>
<post_press_version>
    <ORDER>2</ORDER>
    <post_press_version_op_id>0</post_press_version_op_id>
    <version_code>COMM</version_code>
    <post_press_resource_type>PB</post_press_resource_type>
</post_press_version>
<post_press_version>
    <ORDER>3</ORDER>
    <post_press_version_op_id>0</post_press_version_op_id>
    <version_code>COMM</version_code>
    <post_press_resource_type>PB</post_press_resource_type>
</post_press_version>
</dataroot>

我的 XML 应该如下所示(我已经删减了一些信息,以便更容易查看重要部分);

<?xml version="1.0" encoding="UTF-8"?>
<dataroot xmlns:od="urn:schemas-microsoft-com:officedata"
          generated="2015-01-07T14:06:55">
   <order job_id="" site_code="" replace="true">
      <job_description>TESTDATA</job_description>
      <order_qty>1900</order_qty>
      <finishing_style>PB</finishing_style>
      <depth>10</depth>
      <width>8</width>
      <cover_pagination>4</cover_pagination>
      <text_pagination>12</text_pagination>
      <delivery_commence_date>15/12/2014</delivery_commence_date>
      <delivery_complete_date>15/12/2014</delivery_complete_date>
      <job_site>DG</job_site>
      <managing_printer>DG</managing_printer>
      <is_managing_printer>TRUE</is_managing_printer>
      <cust_order_ref>776031</cust_order_ref>
      <cust_code>Test</cust_code>
      <site_cce_name>Jamie</site_cce_name>
      <site_cce_email>[email protected] /cdn-cgi/l/email-protection</site_cce_email>
      <sales_person_name>Jamie Brace</sales_person_name>
      <sales_person_email>[email protected] /cdn-cgi/l/email-protection</sales_person_email>
      <master_version>
         <version_id/>
         <version_code>COMM</version_code>
         <version_common>true</version_common>
         <version_finished>false</version_finished>
         <version_description>Common</version_description>
         <version_nett_qty>176262</version_nett_qty>
         <version_special_qty>10</version_special_qty>
      </master_version>
   </order>
</dataroot>

但看起来是这样的;

<?xml version="1.0" encoding="UTF-8"?>
<dataroot xmlns:od="urn:schemas-microsoft-com:officedata"
          generated="2015-01-07T14:06:55">
   <order job_id="" site_code="" replace="true">
      <job_description>TESTDATA</job_description>
      <order_qty>1900</order_qty>
      <finishing_style>PB</finishing_style>
      <depth>10</depth>
      <width>8</width>
      <cover_pagination>4</cover_pagination>
      <text_pagination>12</text_pagination>
      <delivery_commence_date>15/12/2014</delivery_commence_date>
      <delivery_complete_date>15/12/2014</delivery_complete_date>
      <job_site>DG</job_site>
      <managing_printer>DG</managing_printer>
      <is_managing_printer>TRUE</is_managing_printer>
      <cust_order_ref>776031</cust_order_ref>
      <cust_code>Test</cust_code>
      <site_cce_name>Jamie</site_cce_name>
      <site_cce_email>[email protected] /cdn-cgi/l/email-protection</site_cce_email>
      <sales_person_name>Jamie Brace</sales_person_name>
      <sales_person_email>[email protected] /cdn-cgi/l/email-protection</sales_person_email>
      <master_version>
         <ORDER>1</ORDER>
         <version_id/>
         <version_code>COMM</version_code>
         <version_common>true</version_common>
         <version_finished>false</version_finished>
         <version_description>Common</version_description>
         <version_nett_qty>176262</version_nett_qty>
         <version_special_qty>10</version_special_qty>
      </master_version>
      <master_version>
         <ORDER>2</ORDER>
         <version_code>COMM</version_code>
         <version_common>TRUE</version_common>
         <version_finished>FALSE</version_finished>
         <version_description>Common</version_description>
         <version_nett_qty>1900</version_nett_qty>
         <version_special_qty>0</version_special_qty>
      </master_version>
   </order>
</dataroot>

“master_version”元素应该嵌套在转换之后,确实如此,但是如果“master_version”中的“ORDER”节点不等于“order”中的“ORDERPK”,转换也会告诉它删除所有元素,它似乎没有这样做。

有任何想法吗?

另外我被告知我的 XSLT 格式不太好,有人可以帮忙解决吗?


您的 XSLT 存在许多问题。专注于手头的问题,一个问题是您的“订单”模板之一使用了xsl:copy-of

 <xsl:template match="order">
    <order job_id="{@job_id}" site_code="{@site_code}" replace="{Replace}">
        <xsl:apply-templates select="node()"/>
        <xsl:copy-of select="../master_version"/>
     </order>
 </xsl:template>

在继续之前,您有两个匹配“order”的模板。严格来说,这在 XSLT 中被指定为错误。您实际上可能没有看到错误,因为某些处理器会忽略重复的模板,而只使用最后一个。你应该删除第一个。

无论如何,通过使用xsl:copy-of它只是复制所有master_version此处的元素,无论此处是否有任何其他模板匹配。你需要使用xsl:apply-templates

<xsl:template match="order">
   <order job_id="{@job_id}" site_code="{@site_code}" replace="{Replace}">
      <xsl:apply-templates select="node()"/>
      <xsl:apply-templates select="../master_version"/>
   </order>
</xsl:template>

但这本身是行不通的,因为这两个模板匹配(尽管必须模板都匹配只是一个错误)master_version如上所述)

<xsl:template match="job_id | site_code | replace | master_version"/>

<xsl:template match="Replace | master_version"/>

去除master_version从这些模板匹配中,只保留现有的一个

<xsl:template match="master_version[not(ORDER = //order/ORDERPK)]"/>

(请注意,当一个元素与条件匹配时,它实际上会比刚刚匹配的元素具有更高的优先级master_version,因此在本例中这不是错误)。

此时你也会在那里,但你现在会发现master_version仍然会在当前位置输出。为了解决这个问题,您可以使用模板匹配dataroot并添加代码以显式忽略master_version此时的元素

<xsl:template match="dataroot">
  <xsl:copy>
     <xsl:apply-templates select="@*|node()[not(self::master_version)]"/>
  </xsl:copy>
</xsl:template>

试试这个 XSLT。它可能不会给出您指定的精确输出,但它应该可以解决您的问题master_version您询问的要素:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

   <xsl:template match="master_version[not(ORDER = //order/ORDERPK)]"/>

   <xsl:template match="press_section[not(ORDER = //order/ORDERPK)]"/>
   <xsl:template match="version[not(ORDER = //order/ORDERPK)]"/>
   <xsl:template match="task_info_press_section[not(ORDER = //order/ORDERPK)]"/>
   <xsl:template match="task_info_post_press[not(ORDER = //order/ORDERPK)]"/>
   <xsl:template match="post_press_version[not(ORDER = //order/ORDERPK)]"/>
   <!-- removes specified nodes from all elements -->

   <xsl:template match="ORDER"/>
   <xsl:template match="ORDERPK"/>
   <xsl:template match="PRESS_x0020_SECTION"/>
   <xsl:template match="POST_x0020_PRESS"/>

   <!-- Creates attributes against the ORDER element -->
   <xsl:strip-space elements="*"/>
   <xsl:output method="xml" indent="yes"/>

   <xsl:template match="dataroot">
      <xsl:copy>
         <xsl:apply-templates select="@*|node()[not(self::master_version)]"/>
      </xsl:copy>
   </xsl:template>

   <xsl:template match="job_id | site_code | replace | Replace"/>

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

   <xsl:template match="order">
      <order job_id="{@job_id}" site_code="{@site_code}" replace="{Replace}">
         <xsl:apply-templates select="node()"/>
         <xsl:apply-templates select="../master_version"/>
      </order>
   </xsl:template>

   <xsl:template match="task_info_press_section">
      <xsl:element name="task_info1">
         <xsl:apply-templates/>
      </xsl:element>
   </xsl:template>

   <xsl:template match="task_info_post_press">
      <xsl:element name="task_info2">
         <xsl:apply-templates/>
      </xsl:element>
   </xsl:template>
</xsl:stylesheet>

另请注意,正如 Daniel Haley 在评论中提到的,多个身份模板已被删除。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

XSLT 转换未提供正确的输出 的相关文章

随机推荐

  • 如何访问iOS中的弱链接框架?

    我想在 iOS 5 上使用 Twitter 框架 但能够在旧操作系统中运行我的应用程序 我在 Xcode 4 2 Target 设置中添加了弱引用框架 即设置 可选 标志 基础 SDK 是 iOS 5 iOS 部署目标是 iOS 3 2 接
  • 如何将第三方 npm 包与 ember cli 应用程序一起使用

    EDIT 这实际上是关于任何不适合与 ember 一起使用的 npm 包 就我而言 我尝试让 crypto js 工作 但对于任何不是专门为 ember cli 设计的 npm 包来说 似乎总是遇到同样的问题 我想在我的 ember 应用程
  • Python 错误代码已升级

    考虑一个 python 脚本 error py import sys sys exit 3 Invoking python error py echo 产生预期的 3 但是 考虑 runner py import os result os
  • 在 Android 应用程序中使用个人证书

    我希望用户能够在从生成证书的网站安装后将他们自己的个人证书安装到我的 Android 应用程序中 但是当我使用 WebClient 或 Android 浏览器浏览它时 安全存储会弹出并安装它 在版本 14 Android 4 0 之前 AP
  • 带返回值的动态 Linq 表达式

    我需要创建一个动态 linq 表达式 然后我开始使用许多示例 我测试了一些工作 有些没有 在这种情况下 我想创建一个如下所示的方法 public bool Check int intvar if i gt 2 return true els
  • Laravel 4:调用未定义的方法 Redis::connection()

    我对这个错误快要疯了 我有一个 Debian 7 的 vagrant VM 用 Puphpet 生成 安装得很好 1 Redis已安装并运行 redis server在跑 我可以使用服务器127 0 0 1 6379 2 安装php5 re
  • Code First:Fluent api 会影响 UI 吗?

    我正在读 Julie Lerman 写的一本关于 Code First 的书 根据这本书 注释和 Fluent api 给出相同的结果 一切都取决于开发人员的风格 我知道注释允许配置代码如何首先生成数据库对象以及 MVC 如何自定义 UI
  • 点击事件后关闭汉堡菜单

    我有一个汉堡菜单 几乎完整 只有 1 个我无法弄清楚的错误 问题 我的导航链接到主页上的不同区域 因此 在主页上 用户可以单击导航链接 这将立即将他们带到页面上的所需位置 我的问题是因为没有加载 所以一旦用户单击导航链接 他们就会被带到该位
  • 使用 secure_random 在 rspec 中存根随机值

    我正在尝试为我的 gem 编写规范 它生成 otp 并将其保存在数据库中 现在我正在为其编写规格 所以基本上我有三种方法generate otp regenerate otp verify otp otp what generate otp
  • angular2 TypeError:无法设置未定义的属性“名称”

    我有一个 Angular2 项目 在 Mac OS 上创建并运行 但是当我在Windows上git它时 它无法运行 在 Chrome 中 我收到此错误 core umd js 3491 EXCEPTION Uncaught in promi
  • 使用 fillcolor 节点增强 BGL write_graphviz make_label_writer

    我想用自定义颜色填充某些节点的颜色 那么图形的顶点属性中是否有自定义属性设置或重新实现自定义函子 make edges writer include
  • Kubernetes 部署和初始化容器

    I 最近学到的 https stackoverflow com questions 44233242 kubernetes cluster and phoenix automate mix ecto migrate 44233465 442
  • ContentPlaceHolders:重复内容

    Scenario 我有一个使用 asp net 母版页的应用程序 我想在其中重复页面顶部和底部的一些内容 目前我使用这样的东西 Master Page
  • 针对安全的 AWS ElasticSearch 进行搜索

    我在 AWS 上设置了一个新的 ElasticSearch 集群 该集群仅允许特定 IAM 用户访问 然而 我尝试从 Ruby 连接到此 并考虑使用 AWS SDK 但它没有实际对 ES 集群进行 HTTP 操作的方法 只能访问配置 API
  • 使用 SOQL 查询 Salesforce 对象列名称

    我在 Salesforce 实例和 S3 存储桶之间的 SnapLogic 集成中使用 Salesforce SOQL 管理单元 我尝试在 Salesforce SOQL 快照字段 SOQL 查询 中使用 SOQL 查询来返回对象的列名称
  • 具有整数值的 NSDictionary

    我正在开发一款与怪物有关的游戏 每个都有一个统计数据列表 这些统计数据都是整数 我可以将每个统计数据设置为它自己的变量 但我更愿意将它们保存在 NSDictionary 中 因为它们都是相关的 当我尝试更改每个统计数据的值时遇到问题 我拥有
  • 正则表达式查找字符串中的一系列大写单词

    text This is a TEXT CONTAINING UPPER CASE WORDS and lower case words This is a SECOND SENTENCE pattern A Z A Z A Z s re
  • 访问 ListView 编辑命令上的控件

    In my ListView我有一个ItemTemplate and EditItemTemplate分别看起来像这样 gt 当我单击 编辑 按钮时 它切换到EditItemTemplate查看右侧 我想预填充Textbox并选择对应的op
  • 生成 JSONObject 字符串键

    我有现有的代码使用org json JSONObject的迭代器 JSONObject obj new JSONObject obj put key1 value1 obj put key2 value2 Iterator keys obj
  • XSLT 转换未提供正确的输出

    我的 XSLT 转换遇到了一些小问题 我有以下 XSLT