[英]Uninstalling VMware workstation in Ubuntu machine
在 Ubuntu 中卸載 VMware 工作站
之后我刪除了一些重要的 VMware 文件,之后我使用 VMware 的正確卸載命令進行卸載,但無法卸載 VMware 工作站
您的問題確實還不清楚,但總的來說,如果您希望身份轉換用默認的子元素填充父元素,則必須為此創建一個模板,例如:
<xsl:template match="Parent[not(Child)]">
<xsl:copy>
<Child>This is the default Child element</Child>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
普通身份轉換將復制任何確實具有Child
子元素的Parent
元素; 這只匹配不匹配的元素,它復制Parent
元素及其內容,但在其中插入一個Child
元素。
編輯:
現在,我們對數據有了更多的了解,這是一個更好的示例。 此外,這還解決了在文檔中按正確順序創建元素的問題:
<xsl:template match="Salary/Max[not(preceding-sibling::Min)]"/>
<Min Value="0">0</Min>
<xsl:copy>
<xsl:apply-templates select="node() | @*"/>
</xsl:copy>
</xsl:template>
這將匹配作為Salary
的子元素且沒有前面名為Min
同級的任何Max
元素,並將發出默認的Min
元素,然后是Max
元素的副本。
如果您想更加明確,可以使用模式Salary/Max[not(preceding-sibling::*[1]/name() = 'Min')]
,該模式將匹配其前一個同級的任何Max
元素沒有命名為Min
。
在 Ubuntu 機器上卸載 VMware
使用具有root權限的命令卸載
sudo vmware-installer -u vmware-player
如果您在使用上述命令之前刪除了一些文件,該命令將無法正常工作
對於此問題:重新安裝 VMware 工作站
sudo ./VMware-Player-Full-16.2.4-20089737.x86_64.bundle
並再次使用此命令:)
sudo vmware-installer -u vmware-player
在這種情況下,必須使用兩個相互排斥的模板:
<xsl:template match="Max[not(preceding-sibling::Min)]">
<Min Value="0">0</Min>
<xsl:copy-of select="."/>
</xsl:template>
<xsl:template match="Max[preceding-sibling::Min]">
<xsl:copy-of select="."/>
</xsl:template>
如果Min標簽的位置不重要,則可以更改與任何節點匹配的模板,以便在與Job節點匹配時,在末尾插入缺少的元素。
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
<xsl:if test="name()='Job' and not(Salary/Min)">
<Min>0.00</Min>
</xsl:if>
</xsl:copy>
</xsl:template>
或者,如果您希望丟失的Min元素始終出現在同一位置(即CompanyName元素之后),則可以執行以下操作。
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
<xsl:if test="name()='CompanyName' and not(../Salary/Min)">
<Min>0.00</Min>
</xsl:if>
</xsl:template>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.