使用 XSL 进行 XML 排序

发布于 2024-10-03 12:17:32 字数 7116 浏览 0 评论 0原文

我有一个 XML 文件

<?xml version="1.0" encoding="UTF-8"?>
<data>

 <contact-information>

  <full-name>Peter John</full-name>
  <address_line_1>some place</address_line_1>
  <address_line_2>some place2</address_line_2>
  <city>some city</city>
  <state>some state</state>
  <zip>54000</zip>
  <country>some country</country>
  <phone>2121314144</phone>
  <email>[email protected]</email>

</contact-information>

<professional-experience-section>
  <section-name>PROFESSIONAL EXPERIENCE</section-name>
  <enabled>true</enabled>
  <company>
    <name>Computer Sciences Corporation</name>
    <city>New York</city>
    <state>NY</state>
    <country>United States</country>
    <job-title>
      <title>Senior Software Engineer</title>
      <start-date>Aug 1996</start-date>
      <end-date>May 2010</end-date>
      <ongoing>false</ongoing>
      <job-description>
        <bullet-point>
          <statement>C#, Visual Basic, Asp.net</statement>
        </bullet-point>
        <bullet-point>
          <statement>Inspect completed work to ensure conformance to specifications, standards, and contract requirements.</statement>
        </bullet-point>
        <bullet-point>
          <statement>Another Work Description.</statement>
        </bullet-point>
      </job-description>
    </job-title>
  </company>
  <company>
    <name>Acme</name>
    <city>Silver Spring</city>
    <state>MD</state>
    <country>United States</country>
    <job-title>
      <title>Manager</title>
      <start-date>Jul 2010</start-date>
      <end-date>present</end-date>
      <ongoing>true</ongoing>
      <job-description>
        <bullet-point>
          <statement>Report to management regarding the finances of establishment.</statement>
        </bullet-point>
        <bullet-point>
          <statement>Prepare, examine, or analyze accounting records, financial statements, or other financial reports to assess accuracy, completeness, and conformance to reporting and procedural standards.</statement>
        </bullet-point>
        <bullet-point>
          <statement>Prepare, examine, or analyze accounting records, financial statements, or other financial reports to assess accuracy, completeness, and conformance to reporting and procedural standards.</statement>
        </bullet-point>
      </job-description>
    </job-title>

    <job-title>
      <title>Analyst</title>
      <start-date>Jul 2001</start-date>
      <end-date>Jan 2010</end-date>
      <ongoing>false</ongoing>
      <job-description>
        <bullet-point>
          <statement>Study and rehearse roles from scripts in order to interpret, learn and memorize lines, stunts, and cues as directed.</statement>
        </bullet-point>
        <bullet-point>
          <statement>Work closely with directors, other actors, and playwrights to find the interpretation most suited to the role.</statement>
        </bullet-point>
      </job-description>
    </job-title>

  </company>
</professional-experience-section>


<education-section>
  <section-name>EDUCATION</section-name>
  <enabled>true</enabled>
  <institution>
    <name>Allston Community College</name>
    <city>Akron</city>
    <state>MA</state>
    <country>United States</country>
    <degree>Bachelor of Art in Marketing Candidate</degree>
    <end-date>Jan 2020</end-date>
    <ongoing>true</ongoing>
    <expected-completion-date>Jan 2020</expected-completion-date>
    <completed></completed>
    <bullet-point>
      <statement>detail of what i did at the allston community college</statement>
    </bullet-point>
  </institution>
  <institution>
    <name>Boston College</name>
    <city>Boston</city>
    <state>MA</state>
    <country>United States</country>
    <degree>Bachelor of Science in Information Systems</degree>
    <end-date>Jul 1990</end-date>
    <ongoing>false</ongoing>
    <expected-completion-date></expected-completion-date>
    <completed>true</completed>
    <bullet-point>
      <statement>Lorem Ipsum</statement>
    </bullet-point>
  </institution>
  <institution>
    <name>Testing</name>
    <city>Testing</city>
    <state>PA</state>
    <country>United States</country>
    <degree>Completed coursework towards Bachelor of Art in Marketing</degree>
    <end-date>Mar 1963</end-date>
    <ongoing>false</ongoing>
    <expected-completion-date></expected-completion-date>
    <completed>false</completed>
    <bullet-point>
      <statement>Lorem Ipsum</statement>
    </bullet-point>
  </institution>
  <institution>
    <name>Testing</name>
    <city>Testing</city>
    <state>PA</state>
    <country>United States</country>
    <degree>Completed coursework towards Bachelor of Art in Marketing</degree>
    <end-date>Mar 1963</end-date>
    <ongoing>false</ongoing>
    <expected-completion-date></expected-completion-date>
    <completed>false</completed>
    <bullet-point>
      <statement>Lorem Ipsum</statement>
    </bullet-point>
  </institution>
</education-section>
<additional-skills-section>
  <section-name>ADDITIONAL SKILLS</section-name>
  <enabled>true</enabled>
  <layout>1 Column</layout>
  <bullet-point>
    <statement>Additional Skills 1</statement>
  </bullet-point>
   </additional-skills-section>
<custom-section>
  <section-name>PUBLICATIONS</section-name>
  <layout>2</layout>
  <bullet-point>
    <statement>test</statement>
  </bullet-point>
 </custom-section>

</data>

正如您所看到的,该文件包含不同的部分、联系信息、专业和教育?

我想使用 xsl 对这些部分进行排序。

通过排序,我的意思是,当应用 xsl 转换时,我希望专业部分首先出现在转换后的 xml 中。

我怎样才能在 xsl 中做到这一点? xml元素是如何解析的?意思是优先?

I have an XML File

<?xml version="1.0" encoding="UTF-8"?>
<data>

 <contact-information>

  <full-name>Peter John</full-name>
  <address_line_1>some place</address_line_1>
  <address_line_2>some place2</address_line_2>
  <city>some city</city>
  <state>some state</state>
  <zip>54000</zip>
  <country>some country</country>
  <phone>2121314144</phone>
  <email>[email protected]</email>

</contact-information>

<professional-experience-section>
  <section-name>PROFESSIONAL EXPERIENCE</section-name>
  <enabled>true</enabled>
  <company>
    <name>Computer Sciences Corporation</name>
    <city>New York</city>
    <state>NY</state>
    <country>United States</country>
    <job-title>
      <title>Senior Software Engineer</title>
      <start-date>Aug 1996</start-date>
      <end-date>May 2010</end-date>
      <ongoing>false</ongoing>
      <job-description>
        <bullet-point>
          <statement>C#, Visual Basic, Asp.net</statement>
        </bullet-point>
        <bullet-point>
          <statement>Inspect completed work to ensure conformance to specifications, standards, and contract requirements.</statement>
        </bullet-point>
        <bullet-point>
          <statement>Another Work Description.</statement>
        </bullet-point>
      </job-description>
    </job-title>
  </company>
  <company>
    <name>Acme</name>
    <city>Silver Spring</city>
    <state>MD</state>
    <country>United States</country>
    <job-title>
      <title>Manager</title>
      <start-date>Jul 2010</start-date>
      <end-date>present</end-date>
      <ongoing>true</ongoing>
      <job-description>
        <bullet-point>
          <statement>Report to management regarding the finances of establishment.</statement>
        </bullet-point>
        <bullet-point>
          <statement>Prepare, examine, or analyze accounting records, financial statements, or other financial reports to assess accuracy, completeness, and conformance to reporting and procedural standards.</statement>
        </bullet-point>
        <bullet-point>
          <statement>Prepare, examine, or analyze accounting records, financial statements, or other financial reports to assess accuracy, completeness, and conformance to reporting and procedural standards.</statement>
        </bullet-point>
      </job-description>
    </job-title>

    <job-title>
      <title>Analyst</title>
      <start-date>Jul 2001</start-date>
      <end-date>Jan 2010</end-date>
      <ongoing>false</ongoing>
      <job-description>
        <bullet-point>
          <statement>Study and rehearse roles from scripts in order to interpret, learn and memorize lines, stunts, and cues as directed.</statement>
        </bullet-point>
        <bullet-point>
          <statement>Work closely with directors, other actors, and playwrights to find the interpretation most suited to the role.</statement>
        </bullet-point>
      </job-description>
    </job-title>

  </company>
</professional-experience-section>


<education-section>
  <section-name>EDUCATION</section-name>
  <enabled>true</enabled>
  <institution>
    <name>Allston Community College</name>
    <city>Akron</city>
    <state>MA</state>
    <country>United States</country>
    <degree>Bachelor of Art in Marketing Candidate</degree>
    <end-date>Jan 2020</end-date>
    <ongoing>true</ongoing>
    <expected-completion-date>Jan 2020</expected-completion-date>
    <completed></completed>
    <bullet-point>
      <statement>detail of what i did at the allston community college</statement>
    </bullet-point>
  </institution>
  <institution>
    <name>Boston College</name>
    <city>Boston</city>
    <state>MA</state>
    <country>United States</country>
    <degree>Bachelor of Science in Information Systems</degree>
    <end-date>Jul 1990</end-date>
    <ongoing>false</ongoing>
    <expected-completion-date></expected-completion-date>
    <completed>true</completed>
    <bullet-point>
      <statement>Lorem Ipsum</statement>
    </bullet-point>
  </institution>
  <institution>
    <name>Testing</name>
    <city>Testing</city>
    <state>PA</state>
    <country>United States</country>
    <degree>Completed coursework towards Bachelor of Art in Marketing</degree>
    <end-date>Mar 1963</end-date>
    <ongoing>false</ongoing>
    <expected-completion-date></expected-completion-date>
    <completed>false</completed>
    <bullet-point>
      <statement>Lorem Ipsum</statement>
    </bullet-point>
  </institution>
  <institution>
    <name>Testing</name>
    <city>Testing</city>
    <state>PA</state>
    <country>United States</country>
    <degree>Completed coursework towards Bachelor of Art in Marketing</degree>
    <end-date>Mar 1963</end-date>
    <ongoing>false</ongoing>
    <expected-completion-date></expected-completion-date>
    <completed>false</completed>
    <bullet-point>
      <statement>Lorem Ipsum</statement>
    </bullet-point>
  </institution>
</education-section>
<additional-skills-section>
  <section-name>ADDITIONAL SKILLS</section-name>
  <enabled>true</enabled>
  <layout>1 Column</layout>
  <bullet-point>
    <statement>Additional Skills 1</statement>
  </bullet-point>
   </additional-skills-section>
<custom-section>
  <section-name>PUBLICATIONS</section-name>
  <layout>2</layout>
  <bullet-point>
    <statement>test</statement>
  </bullet-point>
 </custom-section>

</data>

As you can see this file contains different sections, contact-information, professional and education?

I want to sort these sections using xsl.

By sorting i mean that i want the professional section to appear first in the transformed xml when xsl transformation is applied.

How can i do that in xsl? How are xml elements parsed? Meaning priority?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

流云如水 2024-10-10 12:17:32

此转换

<xsl:stylesheet version="1.0"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 <xsl:output omit-xml-declaration="yes" indent="yes"/>
 <xsl:strip-space elements="*"/>

 <xsl:param name="pRanks">
  <professional-experience-section r="1"/>
  <education-section r="2"/>
  <additional-skills-section r="3"/>
  <custom-section r="4"/>
  <contact-information r="5"/>
 </xsl:param>

 <xsl:variable name="vRanks" select=
     "document('')/*/xsl:param[@name='pRanks']"/>

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

 <xsl:template match="/*">
  <xsl:apply-templates select="*">
   <xsl:sort select="$vRanks/*[name()=name(current())]/@r"
             data-type="number"/>
  </xsl:apply-templates>
 </xsl:template>
</xsl:stylesheet>

当应用于提供的 XML 文档时,根据 pRanks 参数中指定的排名生成排序结果

<professional-experience-section>
   <section-name>PROFESSIONAL EXPERIENCE</section-name>
   <enabled>true</enabled>
   <company>
      <name>Computer Sciences Corporation</name>
      <city>New York</city>
      <state>NY</state>
      <country>United States</country>
      <job-title>
         <title>Senior Software Engineer</title>
         <start-date>Aug 1996</start-date>
         <end-date>May 2010</end-date>
         <ongoing>false</ongoing>
         <job-description>
            <bullet-point>
               <statement>C#, Visual Basic, Asp.net</statement>
            </bullet-point>
            <bullet-point>
               <statement>Inspect completed work to ensure conformance to specifications, standards, and contract requirements.</statement>
            </bullet-point>
            <bullet-point>
               <statement>Another Work Description.</statement>
            </bullet-point>
         </job-description>
      </job-title>
   </company>
   <company>
      <name>Acme</name>
      <city>Silver Spring</city>
      <state>MD</state>
      <country>United States</country>
      <job-title>
         <title>Manager</title>
         <start-date>Jul 2010</start-date>
         <end-date>present</end-date>
         <ongoing>true</ongoing>
         <job-description>
            <bullet-point>
               <statement>Report to management regarding the finances of establishment.</statement>
            </bullet-point>
            <bullet-point>
               <statement>Prepare, examine, or analyze accounting records, financial statements, or other financial reports to assess accuracy, completeness, and conformance to reporting and procedural standards.</statement>
            </bullet-point>
            <bullet-point>
               <statement>Prepare, examine, or analyze accounting records, financial statements, or other financial reports to assess accuracy, completeness, and conformance to reporting and procedural standards.</statement>
            </bullet-point>
         </job-description>
      </job-title>
      <job-title>
         <title>Analyst</title>
         <start-date>Jul 2001</start-date>
         <end-date>Jan 2010</end-date>
         <ongoing>false</ongoing>
         <job-description>
            <bullet-point>
               <statement>Study and rehearse roles from scripts in order to interpret, learn and memorize lines, stunts, and cues as directed.</statement>
            </bullet-point>
            <bullet-point>
               <statement>Work closely with directors, other actors, and playwrights to find the interpretation most suited to the role.</statement>
            </bullet-point>
         </job-description>
      </job-title>
   </company>
</professional-experience-section>
<education-section>
   <section-name>EDUCATION</section-name>
   <enabled>true</enabled>
   <institution>
      <name>Allston Community College</name>
      <city>Akron</city>
      <state>MA</state>
      <country>United States</country>
      <degree>Bachelor of Art in Marketing Candidate</degree>
      <end-date>Jan 2020</end-date>
      <ongoing>true</ongoing>
      <expected-completion-date>Jan 2020</expected-completion-date>
      <completed/>
      <bullet-point>
         <statement>detail of what i did at the allston community college</statement>
      </bullet-point>
   </institution>
   <institution>
      <name>Boston College</name>
      <city>Boston</city>
      <state>MA</state>
      <country>United States</country>
      <degree>Bachelor of Science in Information Systems</degree>
      <end-date>Jul 1990</end-date>
      <ongoing>false</ongoing>
      <expected-completion-date/>
      <completed>true</completed>
      <bullet-point>
         <statement>Lorem Ipsum</statement>
      </bullet-point>
   </institution>
   <institution>
      <name>Testing</name>
      <city>Testing</city>
      <state>PA</state>
      <country>United States</country>
      <degree>Completed coursework towards Bachelor of Art in Marketing</degree>
      <end-date>Mar 1963</end-date>
      <ongoing>false</ongoing>
      <expected-completion-date/>
      <completed>false</completed>
      <bullet-point>
         <statement>Lorem Ipsum</statement>
      </bullet-point>
   </institution>
   <institution>
      <name>Testing</name>
      <city>Testing</city>
      <state>PA</state>
      <country>United States</country>
      <degree>Completed coursework towards Bachelor of Art in Marketing</degree>
      <end-date>Mar 1963</end-date>
      <ongoing>false</ongoing>
      <expected-completion-date/>
      <completed>false</completed>
      <bullet-point>
         <statement>Lorem Ipsum</statement>
      </bullet-point>
   </institution>
</education-section>
<additional-skills-section>
   <section-name>ADDITIONAL SKILLS</section-name>
   <enabled>true</enabled>
   <layout>1 Column</layout>
   <bullet-point>
      <statement>Additional Skills 1</statement>
   </bullet-point>
</additional-skills-section>
<custom-section>
   <section-name>PUBLICATIONS</section-name>
   <layout>2</layout>
   <bullet-point>
      <statement>test</statement>
   </bullet-point>
</custom-section>
<contact-information>
   <full-name>Peter John</full-name>
   <address_line_1>some place</address_line_1>
   <address_line_2>some place2</address_line_2>
   <city>some city</city>
   <state>some state</state>
   <zip>54000</zip>
   <country>some country</country>
   <phone>2121314144</phone>
   <email>[email protected]</email>
</contact-information>

执行注意:$pRanks 参数可以在外部指定,这样就不需要编辑转换。

This transformation:

<xsl:stylesheet version="1.0"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 <xsl:output omit-xml-declaration="yes" indent="yes"/>
 <xsl:strip-space elements="*"/>

 <xsl:param name="pRanks">
  <professional-experience-section r="1"/>
  <education-section r="2"/>
  <additional-skills-section r="3"/>
  <custom-section r="4"/>
  <contact-information r="5"/>
 </xsl:param>

 <xsl:variable name="vRanks" select=
     "document('')/*/xsl:param[@name='pRanks']"/>

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

 <xsl:template match="/*">
  <xsl:apply-templates select="*">
   <xsl:sort select="$vRanks/*[name()=name(current())]/@r"
             data-type="number"/>
  </xsl:apply-templates>
 </xsl:template>
</xsl:stylesheet>

when applied on the provided XML document, produces the sorted result as per the rankings specified in the pRanks parameter:

<professional-experience-section>
   <section-name>PROFESSIONAL EXPERIENCE</section-name>
   <enabled>true</enabled>
   <company>
      <name>Computer Sciences Corporation</name>
      <city>New York</city>
      <state>NY</state>
      <country>United States</country>
      <job-title>
         <title>Senior Software Engineer</title>
         <start-date>Aug 1996</start-date>
         <end-date>May 2010</end-date>
         <ongoing>false</ongoing>
         <job-description>
            <bullet-point>
               <statement>C#, Visual Basic, Asp.net</statement>
            </bullet-point>
            <bullet-point>
               <statement>Inspect completed work to ensure conformance to specifications, standards, and contract requirements.</statement>
            </bullet-point>
            <bullet-point>
               <statement>Another Work Description.</statement>
            </bullet-point>
         </job-description>
      </job-title>
   </company>
   <company>
      <name>Acme</name>
      <city>Silver Spring</city>
      <state>MD</state>
      <country>United States</country>
      <job-title>
         <title>Manager</title>
         <start-date>Jul 2010</start-date>
         <end-date>present</end-date>
         <ongoing>true</ongoing>
         <job-description>
            <bullet-point>
               <statement>Report to management regarding the finances of establishment.</statement>
            </bullet-point>
            <bullet-point>
               <statement>Prepare, examine, or analyze accounting records, financial statements, or other financial reports to assess accuracy, completeness, and conformance to reporting and procedural standards.</statement>
            </bullet-point>
            <bullet-point>
               <statement>Prepare, examine, or analyze accounting records, financial statements, or other financial reports to assess accuracy, completeness, and conformance to reporting and procedural standards.</statement>
            </bullet-point>
         </job-description>
      </job-title>
      <job-title>
         <title>Analyst</title>
         <start-date>Jul 2001</start-date>
         <end-date>Jan 2010</end-date>
         <ongoing>false</ongoing>
         <job-description>
            <bullet-point>
               <statement>Study and rehearse roles from scripts in order to interpret, learn and memorize lines, stunts, and cues as directed.</statement>
            </bullet-point>
            <bullet-point>
               <statement>Work closely with directors, other actors, and playwrights to find the interpretation most suited to the role.</statement>
            </bullet-point>
         </job-description>
      </job-title>
   </company>
</professional-experience-section>
<education-section>
   <section-name>EDUCATION</section-name>
   <enabled>true</enabled>
   <institution>
      <name>Allston Community College</name>
      <city>Akron</city>
      <state>MA</state>
      <country>United States</country>
      <degree>Bachelor of Art in Marketing Candidate</degree>
      <end-date>Jan 2020</end-date>
      <ongoing>true</ongoing>
      <expected-completion-date>Jan 2020</expected-completion-date>
      <completed/>
      <bullet-point>
         <statement>detail of what i did at the allston community college</statement>
      </bullet-point>
   </institution>
   <institution>
      <name>Boston College</name>
      <city>Boston</city>
      <state>MA</state>
      <country>United States</country>
      <degree>Bachelor of Science in Information Systems</degree>
      <end-date>Jul 1990</end-date>
      <ongoing>false</ongoing>
      <expected-completion-date/>
      <completed>true</completed>
      <bullet-point>
         <statement>Lorem Ipsum</statement>
      </bullet-point>
   </institution>
   <institution>
      <name>Testing</name>
      <city>Testing</city>
      <state>PA</state>
      <country>United States</country>
      <degree>Completed coursework towards Bachelor of Art in Marketing</degree>
      <end-date>Mar 1963</end-date>
      <ongoing>false</ongoing>
      <expected-completion-date/>
      <completed>false</completed>
      <bullet-point>
         <statement>Lorem Ipsum</statement>
      </bullet-point>
   </institution>
   <institution>
      <name>Testing</name>
      <city>Testing</city>
      <state>PA</state>
      <country>United States</country>
      <degree>Completed coursework towards Bachelor of Art in Marketing</degree>
      <end-date>Mar 1963</end-date>
      <ongoing>false</ongoing>
      <expected-completion-date/>
      <completed>false</completed>
      <bullet-point>
         <statement>Lorem Ipsum</statement>
      </bullet-point>
   </institution>
</education-section>
<additional-skills-section>
   <section-name>ADDITIONAL SKILLS</section-name>
   <enabled>true</enabled>
   <layout>1 Column</layout>
   <bullet-point>
      <statement>Additional Skills 1</statement>
   </bullet-point>
</additional-skills-section>
<custom-section>
   <section-name>PUBLICATIONS</section-name>
   <layout>2</layout>
   <bullet-point>
      <statement>test</statement>
   </bullet-point>
</custom-section>
<contact-information>
   <full-name>Peter John</full-name>
   <address_line_1>some place</address_line_1>
   <address_line_2>some place2</address_line_2>
   <city>some city</city>
   <state>some state</state>
   <zip>54000</zip>
   <country>some country</country>
   <phone>2121314144</phone>
   <email>[email protected]</email>
</contact-information>

Do note: The $pRanks parameter can be specified externally so that the transformation will never need to be edited.

泅渡 2024-10-10 12:17:32

该样式表稍微修改了身份规则:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="node()|@*">
        <xsl:copy>
            <xsl:apply-templates select="@*"/>
            <xsl:apply-templates select="node()">
                <xsl:sort select="not(self::professional-experience-section)"/>
            </xsl:apply-templates>
        </xsl:copy>
    </xsl:template>
</xsl:stylesheet>

This stylesheet modifying a litle the identity rule:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="node()|@*">
        <xsl:copy>
            <xsl:apply-templates select="@*"/>
            <xsl:apply-templates select="node()">
                <xsl:sort select="not(self::professional-experience-section)"/>
            </xsl:apply-templates>
        </xsl:copy>
    </xsl:template>
</xsl:stylesheet>
九歌凝 2024-10-10 12:17:32

如果没有根元素,您的标记就不是格式良好的 XML 文档。如果您希望我们帮助处理 XSLT,那么我们还需要知道根元素是什么。假设您有一个名为“data”的元素包装您已发布的那些元素,并且您想使用 XSLT 1.0 对它们重新排序,然后执行以下操作

<xsl:template match="data">
  <xsl:copy>
    <xsl:copy-of select="professional-experience-section"/>
    <xsl:copy-of select="*[not(self::professional-experience-section)]"/>
  </xsl:copy>
</xsl:template>

Well without a root element your markup is not a well-formed XML document. And if you want us to help with XSLT then we also need to know what the root element is. Assuming you have an element named "data" wrapping those elements you have posted and you want to reorder them with XSLT 1.0 then do

<xsl:template match="data">
  <xsl:copy>
    <xsl:copy-of select="professional-experience-section"/>
    <xsl:copy-of select="*[not(self::professional-experience-section)]"/>
  </xsl:copy>
</xsl:template>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文