Where can I find XML schema definitions (XSD) for JSF Facelets tag libraries?

♀尐吖头ヾ 提交于 2020-11-28 08:30:04

问题


Where can I find XML schema definitions for

xmlns:ui="http://java.sun.com/jsf/facelets" 
xmlns:h="http://java.sun.com/jsf/html" 
xmlns:f="http://java.sun.com/jsf/core" 
xmlns:c="http://java.sun.com/jstl/core" 

or since JSF 2.2

xmlns:jsf="http://xmlns.jcp.org/jsf" 
xmlns:ui="http://xmlns.jcp.org/jsf/facelets" 
xmlns:h="http://xmlns.jcp.org/jsf/html" 
xmlns:f="http://xmlns.jcp.org/jsf/core" 
xmlns:a="http://xmlns.jcp.org/jsf/passthrough" 
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core" 

?


回答1:


I recently found puzzling lack of XSD for JSF tags. Although such XSD would not be complete reference as described here I find it still useful. They can help avoid typos and provide documentation for tags and attributes.

Therefore I transformed available taglib.xml files to XSD files. The result is available on my GitHub project. Available XSLT transform can be used to generate XSD from any *.taglib.xml file.

In IntelliJ IDEA Community those XSDs work like a charm.




回答2:


In the jar-file of your JSF implementation there is a META-INF folder. There you can find the .tld files that you need. But they are not .xsd.

Note that if you are using facelets, the facelets definitions are in the jsf-facelets-xx.jar

As for the JSTL core tags - this is a useful reference

That is all about JSF pre-2.0.




回答3:


You can convert the .tld files from @Bozho's answer to XSD files to integrate into an Schema Aware XML Editor Details

If you happen to use IntelliJ, you can add the JSF facet to your module, and the IDE will provide autocomplete and documentation for elements and attributes in the JSF namespaces, based directly on the .tld files.



来源:https://stackoverflow.com/questions/2271449/where-can-i-find-xml-schema-definitions-xsd-for-jsf-facelets-tag-libraries

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!