找不到名称空间http://www.w3.org/1999/xlink JSF的库

时间:2019-01-07 15:00:48

标签: jsf xhtml xlink

我正在尝试在登录页面上添加两个图标。当我尝试添加库时,jsf显示错误“找不到名称空间http://www.w3.org/1999/xlink的库”

<html xmlns="http://www.w3.org/1999/xhtml"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:xlink="http://www.w3.org/1999/xlink">
<h:body class="align">
    <div class="grid">
        <form action="https://httpbin.org/post" method="POST" class="form login">
            <img class="logo" src="resources/img/logo%20mailing.png"/> 
            <div class="form__field">
                <label for="login__username"><svg class="icon">
                        <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#user"></use>
                    </svg><span class="hidden">Usuário</span></label>
                <input id="login__username" type="text" name="username" class="form__input" placeholder="Usuário" required="true"/>
            </div>
</form>
</div>
</h:body>

1 个答案:

答案 0 :(得分:0)

已解决

我需要从xmlns:xlink="http://www.w3.org/1999/xlink"更改为xlink="http://www.w3.org/1999/xlink"

从这里<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#user"></use><use xlink="http://www.w3.org/1999/xlink" href="#user"></use>