简体   繁体   English

在 Ubuntu 机器上卸载 VMware 工作站

[英]Uninstalling VMware workstation in Ubuntu machine

Uninstalling VMware workstation in Ubuntu在 Ubuntu 中卸载 VMware 工作站

I have removed some important files of VMware after that I used to uninstall with proper uninstall command of VMware and I'm unable to uninstall VMware workstation之后我删除了一些重要的 VMware 文件,之后我使用 VMware 的正确卸载命令进行卸载,但无法卸载 VMware 工作站

Your question's really not at all clear, but in general, if you want an identity transform to populate a parent element with a default child element, you have to make a template for that, eg: 您的问题确实还不清楚,但总的来说,如果您希望身份转换用默认的子元素填充父元素,则必须为此创建一个模板,例如:

<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>

The ordinary identity transform will copy any Parent element that does have a Child child element; 普通身份转换将复制任何确实具有Child子元素的Parent元素; this one, which only matches those that don't, copies the Parent element and its content, but inserts a Child element into it. 这只匹配不匹配的元素,它复制Parent元素及其内容,但在其中插入一个Child元素。

Edit: 编辑:

Now that we know a little more about the data, here's a better example. 现在,我们对数据有了更多的了解,这是一个更好的示例。 Also, this addresses the concern about creating the element in its proper order in the document: 此外,这还解决了在文档中按正确顺序创建元素的问题:

<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>

That will match any Max element that's a child of Salary and that doesn't have a preceding sibling named Min , and will emit the default Min element and then a copy of the Max element. 这将匹配作为Salary的子元素且没有前面名为Min同级的任何Max元素,并将发出默认的Min元素,然后是Max元素的副本。

If you wanted to be even more explicit, you could use the pattern Salary/Max[not(preceding-sibling::*[1]/name() = 'Min')] , which will match any Max element whose immediately preceding sibling is not named Min . 如果您想更加明确,可以使用模式Salary/Max[not(preceding-sibling::*[1]/name() = 'Min')] ,该模式将匹配其前一个同级的任何Max元素没有命名为Min

Uninstalling VMware in Ubuntu machine在 Ubuntu 机器上卸载 VMware

Use command with root permission to uninstall使用具有root权限的命令卸载

sudo vmware-installer -u vmware-player

if you removed some files before using above command the command will not work properly如果您在使用上述命令之前删除了一些文件,该命令将无法正常工作

For this issue: Reinstall VMware workstation again对于此问题:重新安装 VMware 工作站

sudo ./VMware-Player-Full-16.2.4-20089737.x86_64.bundle

and use this command again:)并再次使用此命令:)

sudo vmware-installer -u vmware-player

In this case, you must use two templates which exclude themselves mutually: 在这种情况下,必须使用两个相互排斥的模板:

<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>

If the position of the Min tag is not important, you could change the template that matches any node so that when it matches a Job node, it inserts the missing elements at the end. 如果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>

Alternatively, if you want the missing Min element to always appear in the same place (ie after the CompanyName element) you could do something like this. 或者,如果您希望丢失的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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM