如何解决cvc-complex-type.2.4.d:.taglib.xml文件Macbook M1中的无效内容错误 [英] How to solve cvc-complex-type.2.4.d: Invalid content error in .taglib.xml file Macbook M1

查看:55
本文介绍了如何解决cvc-complex-type.2.4.d:.taglib.xml文件Macbook M1中的无效内容错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图更新Maven项目,但是.taglib.xml文件中出现错误.在Windows计算机中,此错误未出现,但发生在我的Macbook中.请看如下.

I tried to update the maven project, but got an error in .taglib.xml file. In windows computer this error does not appear, but it was happened in my macbook. Please see as below.

此代码在taglib.xml文件中.

This code in taglib.xml file.

<?xml version="1.0" encoding="UTF-8"?>
<facelet-taglib xmlns="http://java.sun.com/xml/ns/javaee"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facelettaglibrary_2_0.xsd"
                version="2.0">
    
    <namespace>http://primefaces.org/babylon</namespace>
    
    <tag>
        <description><![CDATA[Menu is a navigation component for Babylon Layout.]]></description>
        <tag-name>menu</tag-name>
        <component>
            <component-type>org.primefaces.component.BabylonMenu</component-type>
            <renderer-type>org.primefaces.component.BabylonMenuRenderer</renderer-type>
        </component>
        <attribute>
            <description><![CDATA[Unique identifier of the component in a namingContainer.]]></description>
            <name>id</name>
            <required>false</required>
            <type>java.lang.String</type>
        </attribute>
        <attribute>
            <description><![CDATA[Boolean value to specify the rendering of the component, when set to false component will not be rendered.]]></description>
            <name>rendered</name>
            <required>false</required>
            <type>java.lang.Boolean</type>
        </attribute>
        <attribute>
            <description><![CDATA[An el expression referring to a server side UIComponent instance in a backing bean.]]></description>
            <name>binding</name>
            <required>false</required>
            <type>javax.faces.component.UIComponent</type>
        </attribute>
        <attribute>
            <description><![CDATA[Name of the client side widget.]]></description>
            <name>widgetVar</name>
            <required>false</required>
            <type>java.lang.String</type>
        </attribute>
        <attribute>
            <description><![CDATA[A menu model instance to create menu programmatically.]]></description>
            <name>model</name>
            <required>false</required>
            <type>org.primefaces.model.menu.MenuModel</type>
        </attribute>
        <attribute>
            <description><![CDATA[Inline style of the main container element.]]></description>
            <name>style</name>
            <required>false</required>
            <type>java.lang.String</type>
        </attribute>
        <attribute>
            <description><![CDATA[Style class of the main container element.]]></description>
            <name>styleClass</name>
            <required>false</required>
            <type>java.lang.String</type>
        </attribute>
        <attribute>
            <description><![CDATA[Whether the orientation of the menu is horizontal.]]></description>
            <name>horizontal</name>
            <required>false</required>
            <type>java.lang.Boolean</type>
        </attribute>
        <attribute>
            <description><![CDATA[When enabled, scroll state is saved in a cookie for the session. Default is true.]]></description>
            <name>statefulScroll</name>
            <required>false</required>
            <type>java.lang.Boolean</type>
            <defaultValue>true</defaultValue>
        </attribute>
    </tag>
</facelet-taglib>

我不确定父项目pom.xml中依赖项的库是否未添加到子项目中?

I'm not sure the library from dependencies in pom.xml of parent project are not added in child project or not?

推荐答案

我认为您会发现其中不允许使用 defaultValue .我不确定它是否已声明.如果您将鼠标悬停在属性"标记的名称,悬停信息将显示在那里合法的内容.您必须将其删除,然后当想要 statefulScroll true 时,将其设置为这样.

I think you'll find that defaultValue is not allowed there. I'm not sure it's at all declared. If you hover over the "attribute" tag's name, the hover info will show what is legal there. You'll have to remove it, and when you want statefulScroll to be true, set it as such.

这篇关于如何解决cvc-complex-type.2.4.d:.taglib.xml文件Macbook M1中的无效内容错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆