XSL:合并两个应用模板的输出并对它们进行排序

如何解决XSL:合并两个应用模板的输出并对它们进行排序

亲爱的,目前我正在用WORD建立一个自定义引用样式,我想为书目输出实现以下内容:

  • 书籍的章节应由其各自的作者显示(BookSection)
  • 图书作者应在书目中显示为额外条目
  • 两者的输出都应归入一个列表!

我已经做好了这样的工作:通过这样做,在参考书目中将显示两个条目:

<xsl:template match="b:Bibliography">
        <html xmlns="https://www.w3.org/TR/REC-html40">
           <body>
              <xsl:variable name="Literatur">
              <xsl:apply-templates select ="b:Source[b:SourceType = 'BookSection'] | b:Source[b:SourceType = 'Book']  | b:Source[b:SourceType = 'ArticleInAPeriodical']" />
              <xsl:apply-templates select ="b:Source[b:SourceType = 'BookSection']" mode="ExtraBookAuthorEntry" />
              </xsl:variable>
              <xsl:copy-of select="$Literatur"/>

                  <span style="font-size: 12pt; font-family: 'TimesNewRoman'; font-weight: bold;">
                  <xsl:text>Internetquellen</xsl:text>
                  </span>
                  <xsl:apply-templates select = "b:Source[b:SourceType = 'InternetSite'] | b:Source[b:SourceType = 'DocumentFromInternetSite']">
                     <xsl:sort select="b:Tag" order="descending"/>
                  </xsl:apply-templates>
               </body>

            </html>
         </xsl:template>

现在,第一个应用模板的条目将可见,在此之下,将有一个额外的部分以及下一个应用模板。

不过,我只想对变量“ Literatur”中的两个apply-template进行排序

如何执行这种排序?你能帮我吗?

谢谢 西蒙

----编辑----

我正在使用以下代码:

<?xml version="1.0" encoding="utf-8"?>

<xsl:stylesheet version="1.0"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   xmlns:msxsl="urn:schemas-microsoft-com:xslt"
   xmlns:b="http://schemas.openxmlformats.org/officeDocument/2006/bibliography"
   xmlns:t="http://www.microsoft.com/temp">
   <xsl:output method="html" encoding="utf-8"/>

   <xsl:template match="*" mode="outputHtml2">
      <xsl:apply-templates mode="outputHtml"/>
   </xsl:template>


   <!--Match the root element,and dispatch to its children-->

   <xsl:template match="/">
      <xsl:apply-templates select="*" />
      <xsl:choose>
         <xsl:when test="b:Version">
            <xsl:text>2020.10.23</xsl:text>
         </xsl:when>

         <xsl:when test="b:OfficeStyleKey">
            <xsl:text>FOM Literatur</xsl:text>
         </xsl:when>

         <xsl:when test="b:XslVersion">
            <xsl:text>1</xsl:text>
         </xsl:when>

         <xsl:when test="b:StyleNameLocalized">
            <xsl:choose>
               <xsl:when test="b:StyleNameLocalized/b:Lcid='1033'">
                  <xsl:text>FOM Literatur</xsl:text>
               </xsl:when>
               <xsl:when test="b:StyleNameLocalized/b:Lcid='2070'">
                  <xsl:text>FOM Literatur</xsl:text>
               </xsl:when>
            </xsl:choose>
         </xsl:when>
      </xsl:choose>

      <!--<xsl:variable name="book_Title">
         <xsl:value-of select="(b:Title)" />
      </xsl:variable>-->

   </xsl:template>


   <xsl:template match="b:GetImportantFields[b:SourceType = 'Book']">
      <b:ImportantFields>
         <b:ImportantField>
            <xsl:text>b:Author/b:Author/b:NameList</xsl:text>
         </b:ImportantField>
         <b:ImportantField>
            <xsl:text>b:Title</xsl:text>
         </b:ImportantField>
         <b:ImportantField>
            <xsl:text>b:ShortTitle</xsl:text>
         </b:ImportantField>
         <b:ImportantField>
            <xsl:text>b:Publisher</xsl:text>
         </b:ImportantField>
         <b:ImportantField>
            <xsl:text>b:City</xsl:text>
         </b:ImportantField>
         <b:ImportantField>
            <xsl:text>b:Edition</xsl:text>
         </b:ImportantField>
         <b:ImportantField>
            <xsl:text>b:Year</xsl:text>
         </b:ImportantField>
      </b:ImportantFields>
   </xsl:template>

   <xsl:template match="b:GetImportantFields[b:SourceType = 'BookSection']">
      <b:ImportantFields>
         <b:ImportantField>
            <!--AUTOR (Kurztitel,Jahr): Titel,in: Hrsg (Hrsg.),Buchtitel,Jahr,S. 277 - 299 -->
            <xsl:text>b:Author/b:Author/b:NameList</xsl:text>
         </b:ImportantField>
         <b:ImportantField>
            <xsl:text>b:Title</xsl:text>
         </b:ImportantField>
         <b:ImportantField>
            <xsl:text>b:ShortTitle</xsl:text>
         </b:ImportantField>
         <b:ImportantField>
            <xsl:text>b:BookTitle</xsl:text>
         </b:ImportantField>
         <b:ImportantField>
            <xsl:text>b:Author/b:BookAuthor/b:NameList</xsl:text>
         </b:ImportantField>
         <b:ImportantField>
            <xsl:text>b:Publisher</xsl:text>
         </b:ImportantField>
         <b:ImportantField>
            <xsl:text>b:City</xsl:text>
         </b:ImportantField>
         <b:ImportantField>
            <xsl:text>b:Edition</xsl:text>
         </b:ImportantField>
         <b:ImportantField>
            <xsl:text>b:Year</xsl:text>
         </b:ImportantField>
         <b:ImportantField>
            <xsl:text>b:Pages</xsl:text>
         </b:ImportantField>
         <b:ImportantField>
            <xsl:text>b:Comments</xsl:text>
         </b:ImportantField>
      </b:ImportantFields>
   </xsl:template>



   <!-- Artikel in einer Zeitschrift -->
   <xsl:template match="b:GetImportantFields[b:SourceType = 'ArticleInAPeriodical']">
      <b:ImportantFields>
         <b:ImportantField>
            <xsl:text>b:Author/b:Author/b:NameList</xsl:text>
         </b:ImportantField>
         <b:ImportantField>
            <xsl:text>b:Title</xsl:text>
         </b:ImportantField>
         <b:ImportantField>
            <xsl:text>b:ShortTitle</xsl:text>
         </b:ImportantField>
         <b:ImportantField>
            <xsl:text>b:PeriodicalTitle</xsl:text>
         </b:ImportantField>
         <b:ImportantField>
            <xsl:text>b:Volume</xsl:text>
         </b:ImportantField>
         <b:ImportantField>
            <xsl:text>b:Issue</xsl:text>
         </b:ImportantField>
         <b:ImportantField>
            <xsl:text>b:Year</xsl:text>
         </b:ImportantField>
         <b:ImportantField>
            <xsl:text>b:Pages</xsl:text>
         </b:ImportantField>
         <b:ImportantField>
            <xsl:text>b:Comments</xsl:text>
         </b:ImportantField>
      </b:ImportantFields>
   </xsl:template>

   <xsl:template match="b:GetImportantFields[b:SourceType = 'InternetSite']">
      <b:ImportantFields>
         <b:ImportantField>
            <xsl:text>b:Author/b:Author/b:NameList</xsl:text>
         </b:ImportantField>
         <b:ImportantField>
            <xsl:text>b:Title</xsl:text>
         </b:ImportantField>
         <b:ImportantField>
            <xsl:text>b:ShortTitle</xsl:text>
         </b:ImportantField>
         <b:ImportantField>
            <xsl:text>b:InternetSiteTitle</xsl:text>
         </b:ImportantField>
         <b:ImportantField>
            <xsl:text>b:Year</xsl:text>
         </b:ImportantField>
         <b:ImportantField>
            <xsl:text>b:Month</xsl:text>
         </b:ImportantField>
         <b:ImportantField>
            <xsl:text>b:Day</xsl:text>
         </b:ImportantField>
         <b:ImportantField>
            <xsl:text>b:YearAccessed</xsl:text>
         </b:ImportantField>
         <b:ImportantField>
            <xsl:text>b:MonthAccessed</xsl:text>
         </b:ImportantField>
         <b:ImportantField>
            <xsl:text>b:DayAccessed</xsl:text>
         </b:ImportantField>
         <b:ImportantField>
            <xsl:text>b:URL</xsl:text>
         </b:ImportantField>
      </b:ImportantFields>
   </xsl:template>



   <!--### Abschnitt 2: Hier wird festgelegt,wie die einzelnen Quellen im Literaturverzeichnis
    ausgegeben werden sollen. Hier sind noch nicht alle Arten von Quellen eingetragen.
    Ggf. müssen die entsprechenden Quellenarten noch hinzugefügt werden.###-->

   <xsl:template match = "b:Source[b:SourceType = 'Book'] | b:Source[b:SourceType = 'Report'] | b:Source[b:SourceType = 'ElectronicSource']">
      <p>
         <i>            <!--Autorenliste-->
            <xsl:apply-templates select="b:Author/b:Author" mode="AuthorNamelistFull" />
         </i>
         <xsl:text> (</xsl:text>
         <xsl:value-of select = "b:ShortTitle"/>
         <xsl:text>,</xsl:text>
         <xsl:value-of select = "b:Year"/>
         <xsl:text>): </xsl:text>
         <xsl:value-of select = "b:Title"/>
         <xsl:text>,</xsl:text>
         <xsl:if test="b:Edition != ''">
            <xsl:value-of select = "b:Edition"/>
            <xsl:text>. Aufl.,</xsl:text>
         </xsl:if>
         <xsl:value-of select = "b:City"/>
         <xsl:text>: </xsl:text>
         <xsl:value-of select="b:Publisher"/>
         <xsl:text>,</xsl:text>
         <xsl:value-of select = "b:Year"/>
      </p>
      <!-- <p style="font-family: Arial,Helvetica,sans-serif; font-size: 11pt;">
      <span style="font-weight: bold; ">
        <xsl:text>[</xsl:text>
        <xsl:value-of select = "b:Tag"/>
        <xsl:text>] </xsl:text>
      </span> -->
      <!--Autorenliste-->
      <!-- <xsl:apply-templates select="b:Author/b:Author" mode="AuthorNamelistFull" />
      <xsl:text>: </xsl:text> -->
      <!--Titel-->
      <!-- <xsl:value-of select = "b:Title"/> -->
      <!--Datum-->
      <!-- <xsl:text> (</xsl:text>
      <xsl:value-of select = "b:City"/>
      <xsl:text>,</xsl:text>
      <xsl:value-of select = "b:Year"/>
      <xsl:text>).</xsl:text>
    </p> -->
   </xsl:template>

   <xsl:template match = "b:Source[b:SourceType = 'BookSection']">
      <p>
         <!--AUTOR (Kurztitel,S. 277 - 299 -->
         <i>            <!--Autorenliste-->
            <xsl:apply-templates select="b:Author/b:Author" mode="AuthorNamelistFull" />
         </i>
         <xsl:text> (</xsl:text>
         <xsl:value-of select = "b:ShortTitle"/>
         <xsl:text>,in: </xsl:text>
         <i>
            <xsl:apply-templates select = "b:Author/b:BookAuthor" mode="BookAuthorNamelistFull" />
         </i>
         <xsl:text> (Hrsg.),</xsl:text>
         <xsl:value-of select = "b:BookTitle"/>
         <xsl:text>,</xsl:text>
         <xsl:value-of select = "b:Year"/>
         <xsl:text>,S. </xsl:text>
         <xsl:value-of select = "b:Pages"/>
      </p>
   </xsl:template>

   <!--Extra Eintrag fuer HRSG. vom Sammelband-->
   <xsl:template match = "b:Source[b:SourceType = 'BookSection']" mode="ExtraBookAuthorEntry">
      <p>
         <i>
            <xsl:apply-templates select="b:Author/b:BookAuthor" mode="BookAuthorNamelistFull" />
         </i>
         <xsl:text> (Hrsg.) (</xsl:text>
         <!--TODO fuer ShortTitel vom Sammelband!!-->
         <xsl:value-of select = "b:ShortTitle"/>
         <xsl:text>,</xsl:text>
         <xsl:value-of select = "b:Year"/>
      </p>
   </xsl:template>

   <xsl:template match="b:Source[b:SourceType = 'ArticleInAPeriodical']">
      <p>
         <!--AUTOR (Kurztitel,in: </xsl:text>
         <xsl:value-of select = "b:PeriodicalTitle" />
         <xsl:text>,</xsl:text>
         <xsl:if test="b:Volume != ''">
            <xsl:value-of select = "b:Volume"/>
            <xsl:text></xsl:text>
         </xsl:if>
         <xsl:text>(</xsl:text>
         <xsl:value-of select = "b:Year"/>
         <xsl:text>),</xsl:text>
         <xsl:if test="b:Issue != ''">
            <xsl:text>Nr. </xsl:text>
            <xsl:value-of select = "b:Issue"/>
         </xsl:if>
         <xsl:text>,S. </xsl:text>
         <xsl:value-of select = "b:Pages"/>
      </p>
   </xsl:template>

   <xsl:template match = "b:Source[b:SourceType = 'InternetSite'] | b:Source[b:SourceType = 'DocumentFromInternetSite']">
      <p>
         <i>            <!--Autorenliste-->
            <xsl:apply-templates select="b:Author/b:Author" mode="AuthorNamelistFull" />
         </i>
         <xsl:text> (</xsl:text>
         <xsl:value-of select = "b:ShortTitle"/>
         <xsl:text>,&lt;</xsl:text>
         <xsl:value-of select = "b:URL"/>
         <xsl:text>&gt; </xsl:text>
         <xsl:text>(</xsl:text>
         <xsl:value-of select = "b:Day"/>
         <xsl:text>.</xsl:text>
         <xsl:value-of select = "b:Month"/>
         <xsl:text>.</xsl:text>
         <xsl:value-of select = "b:Year"/>
         <xsl:text>) </xsl:text>
         <xsl:text>[Zugriff: </xsl:text>
         <xsl:value-of select = "b:DayAccessed"/>
         <xsl:text>.</xsl:text>
         <xsl:value-of select = "b:MonthAccessed"/>
         <xsl:text>.</xsl:text>
         <xsl:value-of select = "b:YearAccessed"/>
         <xsl:text>]</xsl:text>

         <!--  <xsl:if test="b:Edition != ''">
              <xsl:value-of select = "b:Edition"/>
              <xsl:text>. Aufl.,</xsl:text>
            </xsl:if> -->
      </p>

   </xsl:template>
   <!-- 
   <xsl:template match = "b:Source[b:SourceType = 'InternetSite'] | b:Source[b:SourceType = 'DocumentFromInternetSite']">
      <p style="font-family: Arial,sans-serif; font-size: 11pt;">
         
         <xsl:apply-templates select="b:Author/b:Author" mode="AuthorNamelistFull" />
         
         <xsl:text>: </xsl:text>
         <xsl:value-of select = "b:Title"/>
         
         <xsl:text> (</xsl:text>
         <xsl:value-of select = "b:Year"/>
         <xsl:text>) </xsl:text>
         <br />
         
         <span style="font-size: 10pt; color: #0000FF;">
            <xsl:text>[</xsl:text>
            <xsl:value-of select = "b:URL"/>
            <xsl:text>]</xsl:text>
         </span>
         
         <span style="font-size: 10pt;">
            <xsl:text> (Zugriff am: </xsl:text>
            <xsl:value-of select = "b:DayAccessed"/>
            <xsl:text>. </xsl:text>
            <xsl:value-of select = "b:MonthAccessed"/>
            <xsl:text>.</xsl:text>
            <xsl:value-of select = "b:YearAccessed"/>
            <xsl:text>).</xsl:text>
         </span>
      </p>
   </xsl:template> -->

   <!--FINISH Label the paragraph as an Office Bibliography paragraph-->

   <!--### Abschnitt 3: Ausgabe im Literaturverzecihnis -->

   <xsl:template match="b:Bibliography">
      <html xmlns="https://www.w3.org/TR/REC-html40">
         <body>


            <xsl:variable name="Literatur">
               <xsl:apply-templates select ="b:Source[b:SourceType = 'BookSection'] | b:Source[b:SourceType = 'Book']  | b:Source[b:SourceType = 'ArticleInAPeriodical']" />
               <xsl:apply-templates select ="b:Source[b:SourceType = 'BookSection']" mode="ExtraBookAuthorEntry" />
            </xsl:variable>

            <xsl:copy-of select="$Literatur"/>

            <span style="font-size: 12pt; font-family: 'TimesNewRoman'; font-weight: bold;">
               <xsl:text>Internetquellen</xsl:text>
            </span>
            <xsl:apply-templates select = "b:Source[b:SourceType = 'InternetSite'] | b:Source[b:SourceType = 'DocumentFromInternetSite']">
               <xsl:sort select="b:Tag" order="descending"/>
            </xsl:apply-templates>
         </body>

      </html>
   </xsl:template>


   <!--<xsl:template match="b:Bibliography">
      <html xmlns="http://www.w3.org/TR/REC-html40">
         <body>
            
            <xsl:apply-templates select ="b:Source[b:SourceType = 'Book']"> 

         </xsl:apply-templates> 
            <xsl:apply-templates select = "b:Source[b:SourceType = 'Book'] | b:Source[b:SourceType = 'BookSection']">
               <xsl:sort select="b:Tag" order="ascending"/>
            </xsl:apply-templates>
            

            <xsl:text>Onlinequellen</xsl:text>
            <xsl:apply-templates select = "b:Source[b:SourceType = 'InternetSite'] | b:Source[b:SourceType = 'DocumentFromInternetSite']">
               <xsl:sort select="b:Tag" order="ascending"/>
            </xsl:apply-templates>
            <br/>

         </body>

      </html>
   </xsl:template>-->




   <!--### Abschnitt 4: Hier wird festgelegt,wie einzelne Zitate ausgegeben werden.###-->

   <xsl:template match = "b:Citation/b:Source">
      <html xmlns = "http://www.w3.org/TR/REC-html40">
         <body>
            <!--Zu erst kommt das Tag,Bsp: [VanV]
        <span style="font-weight:bold">
          <xsl:text>[</xsl:text>
          <xsl:value-of select = "b:Tag"/>
          <xsl:text>] </xsl:text>
        </span>-->
            <!-- Autoren-->
            <!--Anmerkung: Wie die Liste genau aufgebaut ist,steht in Abschnitt 5-->
            <i>
               <xsl:apply-templates select="b:Author/b:Author" mode="AuthorNamelistShort" />
            </i>
            <xsl:apply-templates select="b:Author/b:Interviewee" mode="AuthorNamelistVeryShort" />
            <xsl:text>,</xsl:text>
            <!--Schlagwort-->
            <xsl:value-of select="b:ShortTitle"/>
            <xsl:text>,</xsl:text>
            <!--Datum-->
            <xsl:value-of select = "b:Year"/>
            <!--und noch die Seiten,wenn sie angegeben wurden-->
            <xsl:if test="../b:Pages != ''">
               <xsl:text>,S. </xsl:text>
               <xsl:value-of select = "../b:Pages"/>
            </xsl:if>
         </body>
      </html>
   </xsl:template>

   <!--### Abschnitt 5: Hier wird festgelegt,wie die verschieden langen Autoren- bzw- Interviewpartnerlisten ausgegeben werden.###-->

   <!-- Vollständige Interviewpartnerliste -->
   <xsl:template match="b:Interviewee" mode="IntervieweeNamelistFull">
      <xsl:for-each select="b:NameList/b:Person">
         <xsl:apply-templates select="."/>
         <xsl:if test="position() != last()">
            <xsl:text>,</xsl:text>
         </xsl:if>
      </xsl:for-each>
      <xsl:value-of select="b:Corporate"/>
   </xsl:template>

   <!-- Vollständige Autorenliste -->
   <xsl:template match="b:Author" mode="AuthorNamelistFull">
      <!--<xsl:for-each select="b:NameList/b:Person">-->
      <xsl:for-each select="b:NameList/b:Person">
         <xsl:apply-templates select="."/>
         <xsl:if test="position() != last()">
            <xsl:text>,</xsl:text>
         </xsl:if>
      </xsl:for-each>
      <xsl:value-of select="b:Corporate"/>
   </xsl:template>


   <!-- Vollständige Hrsg. Liste -->
   <xsl:template match="b:BookAuthor" mode="BookAuthorNamelistFull">
      <!--<xsl:for-each select="b:NameList/b:Person">-->
      <xsl:for-each select="b:NameList/b:Person">
         <xsl:apply-templates select="."/>
         <xsl:if test="position() != last()">
            <xsl:text>,</xsl:text>
         </xsl:if>
      </xsl:for-each>
      <xsl:value-of select="b:Corporate"/>
   </xsl:template>

   <xsl:template match="b:Author" mode="AuthorNamelistShort">
      <xsl:for-each select="b:NameList/b:Person">
         <xsl:choose>
            <xsl:when test="position() = 2">
               <xsl:choose>
                  <xsl:when test="last() > 2">
                     <xsl:text> et al.</xsl:text>
                  </xsl:when>
                  <xsl:otherwise>
                     <xsl:text>,</xsl:text>
                     <xsl:apply-templates select="." mode="FirstShort" />
                  </xsl:otherwise>
               </xsl:choose>
            </xsl:when>
            <xsl:when test="position() > 2">
            </xsl:when>
            <xsl:otherwise>
               <xsl:apply-templates select="." mode="FirstShort" />
            </xsl:otherwise>
         </xsl:choose>
      </xsl:for-each>
      <xsl:value-of select="b:Corporate"/>
   </xsl:template>



   <!--### Abschnitt 6: Hier wird festgelegt,wie der Name einer Einzelnen Person aufgebaut ist.###-->
   <!-- Beispiel: "Vorname Vorname2 Nachname" -->
   <xsl:template match="b:Person">
      <xsl:if test="b:Last != ''">
         <xsl:value-of select = "b:Last"/>
      </xsl:if>
      <xsl:text>,</xsl:text>
      <xsl:if test="b:First != ''">
         <xsl:value-of select = "b:First"/>
      </xsl:if>
      <xsl:if test="b:Middle != ''">
         <xsl:text></xsl:text>
         <xsl:value-of select = "b:Middle"/>
      </xsl:if>
   </xsl:template>

   <xsl:template match="b:Person" mode="FirstShort">
      <xsl:if test="b:Last != ''">
         <xsl:value-of select = "b:Last"/>
      </xsl:if>
      <xsl:text>,</xsl:text>
      <xsl:if test="b:First != ''">
         <xsl:value-of select = "substring(b:First,1,1)"/>
         <xsl:text>.</xsl:text>
      </xsl:if>
      <xsl:if test="b:Middle != ''">
         <xsl:text></xsl:text>
         <xsl:value-of select = "substring(b:Middle,1)"/>
         <xsl:text>.</xsl:text>
      </xsl:if>
   </xsl:template>


   <!--<xsl:value-of select="substring(b:Author/b:Author/b:NameList/b:Person/b:First,1)" />-->

   <xsl:template match="text()" />
</xsl:stylesheet>

解决方法

您可以尝试对变量的内容进行排序,但是在XSLT 1中,这只能使用专有扩展功能才能实现,因此对于MS Word,请尝试

<xsl:variable name="p-elements" select="msxml:node-set($Literatur)/p" xmlns:msxml="urn:schemas-microsoft-com:xslt"/>

<xsl:for-each select="$p-elements">
  <xsl:sort select="i"/>
  <xsl:copy-of select="."/>
</xsl:for-each>

代替xsl:copy-of select="$Literatur"/>

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


依赖报错 idea导入项目后依赖报错,解决方案:https://blog.csdn.net/weixin_42420249/article/details/81191861 依赖版本报错:更换其他版本 无法下载依赖可参考:https://blog.csdn.net/weixin_42628809/a
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下 2021-12-03 13:33:33.927 ERROR 7228 [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPL
错误1:gradle项目控制台输出为乱码 # 解决方案:https://blog.csdn.net/weixin_43501566/article/details/112482302 # 在gradle-wrapper.properties 添加以下内容 org.gradle.jvmargs=-Df
错误还原:在查询的过程中,传入的workType为0时,该条件不起作用 &lt;select id=&quot;xxx&quot;&gt; SELECT di.id, di.name, di.work_type, di.updated... &lt;where&gt; &lt;if test=&qu
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct redisServer’没有名为‘server_cpulist’的成员 redisSetCpuAffinity(server.server_cpulist); ^ server.c: 在函数‘hasActiveC
解决方案1 1、改项目中.idea/workspace.xml配置文件,增加dynamic.classpath参数 2、搜索PropertiesComponent,添加如下 &lt;property name=&quot;dynamic.classpath&quot; value=&quot;tru
删除根组件app.vue中的默认代码后报错:Module Error (from ./node_modules/eslint-loader/index.js): 解决方案:关闭ESlint代码检测,在项目根目录创建vue.config.js,在文件中添加 module.exports = { lin
查看spark默认的python版本 [root@master day27]# pyspark /home/software/spark-2.3.4-bin-hadoop2.7/conf/spark-env.sh: line 2: /usr/local/hadoop/bin/hadoop: No s
使用本地python环境可以成功执行 import pandas as pd import matplotlib.pyplot as plt # 设置字体 plt.rcParams[&#39;font.sans-serif&#39;] = [&#39;SimHei&#39;] # 能正确显示负号 p
错误1:Request method ‘DELETE‘ not supported 错误还原:controller层有一个接口,访问该接口时报错:Request method ‘DELETE‘ not supported 错误原因:没有接收到前端传入的参数,修改为如下 参考 错误2:cannot r
错误1:启动docker镜像时报错:Error response from daemon: driver failed programming external connectivity on endpoint quirky_allen 解决方法:重启docker -&gt; systemctl r
错误1:private field ‘xxx‘ is never assigned 按Altʾnter快捷键,选择第2项 参考:https://blog.csdn.net/shi_hong_fei_hei/article/details/88814070 错误2:启动时报错,不能找到主启动类 #
报错如下,通过源不能下载,最后警告pip需升级版本 Requirement already satisfied: pip in c:\users\ychen\appdata\local\programs\python\python310\lib\site-packages (22.0.4) Coll
错误1:maven打包报错 错误还原:使用maven打包项目时报错如下 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources)
错误1:服务调用时报错 服务消费者模块assess通过openFeign调用服务提供者模块hires 如下为服务提供者模块hires的控制层接口 @RestController @RequestMapping(&quot;/hires&quot;) public class FeignControl
错误1:运行项目后报如下错误 解决方案 报错2:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project sb 解决方案:在pom.
参考 错误原因 过滤器或拦截器在生效时,redisTemplate还没有注入 解决方案:在注入容器时就生效 @Component //项目运行时就注入Spring容器 public class RedisBean { @Resource private RedisTemplate&lt;String
使用vite构建项目报错 C:\Users\ychen\work&gt;npm init @vitejs/app @vitejs/create-app is deprecated, use npm init vite instead C:\Users\ychen\AppData\Local\npm-