我正在使用本教程开发 Java 控件。为此,我需要创建MyJavaControl.xsp-config
和编辑它。此链接详细说明了文件的文件格式xsp-config
及其各种标签。
我想知道是否有完整的 DTD 可用于xsp-config
文件?我需要 DTD 的原因是我可以在DOCTYPE
XML 中包含在 Domino Designer 中提供内容帮助的内容。
根据http://www-10.lotus.com/ldd/ddwiki.nsf/dx/XPages_configuration_file_format,xsp-config格式基于 JSF 现有的 faces-config 格式。因此,您可以使用http://java.sun.com/dtd/web-facesconfig_1_1.dtd进行验证。
如果您创建了组件,但不想让它们在 Domino Designer 控件面板中可见,那么您应该可以安全地使用 JSF 1.1 DTD
我使用XPages 配置文件格式中给出的定义创建了一个 DTD 。DTD 不完整,肯定会有不完整的元素。如果您遇到任何问题,请随时编辑答案或发表评论。
<!ELEMENT faces-config ((application | factory | component | converter | managed-bean | navigation-rule | referenced-bean | render-kit | lifecycle | validator | complex-type | composite-component | group | faces-config-extension )*)>
<!ELEMENT faces-config-extension ANY>
<!ELEMENT component (description*, display-name*, icon*, component-type, component-class, facet*, group-type-ref*, attribute*, property*, component-extension*)>
<!ELEMENT component-extension ANY>
<!ELEMENT facet (description*, display-name*, icon*, facet-name, facet-extension*)>
<!ELEMENT facet-extension ANY>
<!ELEMENT base-component-type (#PCDATA)>
<!ELEMENT component-class (#PCDATA)>
<!ELEMENT component-type (#PCDATA)>
<!ELEMENT group-type-ref (#PCDATA)>
<!ELEMENT tag-name (#PCDATA)>
<!ELEMENT property (description*, display-name*, icon*, property-name, property-class, default-value?, suggested-value?, property-extension*)>
<!ELEMENT property-extension ANY>
<!ELEMENT attribute (description*, display-name*, icon*, attribute-name, attribute-class, default-value?, suggested-value?, attribute-extension*)>
<!ELEMENT attribute-extension ANY>
<!ELEMENT allow-load-time-binding (#PCDATA)>
<!ELEMENT allow-non-binding (#PCDATA)>
<!ELEMENT allow-run-time-binding (#PCDATA)>
<!ELEMENT collection-property (#PCDATA)>
<!ELEMENT container-class (#PCDATA)>
<!ELEMENT localizable (#PCDATA)>
<!ELEMENT method-binding-property (#PCDATA)>
<!ELEMENT method-param (method-param-name, method-param-class) >
<!ELEMENT method-param-name (#PCDATA)>
<!ELEMENT method-param-class (#PCDATA)>
<!ELEMENT method-return-type (#PCDATA)>
<!ELEMENT property-add-method (#PCDATA)>
<!ELEMENT property-class (#PCDATA)>
<!ELEMENT property-item-class (#PCDATA)>
<!ELEMENT property-name (#PCDATA)>
<!ELEMENT required (#PCDATA)>
<!ELEMENT tag-attribute (#PCDATA)>
<!ELEMENT complex-type (description*, display-name*, icon*, complex-id, complex-class, group-type-ref*, property*, complex-extension*)>
<!ELEMENT complex-extension ANY>
<!ELEMENT converter (description*, display-name*, icon*, (converter-id | converter-for-class), converter-class, group-type-ref*, attribute*, property*, converter-extension*)>
<!ELEMENT converter-extension ANY>
<!ELEMENT validator (description*, display-name*, icon*, validator-id, validator-class, group-type-ref*, attribute*, property*, validator-extension*)>
<!ELEMENT validator-extension ANY>
<!ELEMENT base-complex-id (#PCDATA)>
<!ELEMENT base-converter-id (#PCDATA)>
<!ELEMENT base-validator-id (#PCDATA)>
<!ELEMENT complex-class (#PCDATA)>
<!ELEMENT complex-id (#PCDATA)>
<!ELEMENT converter-id (#PCDATA)>
<!ELEMENT default-property (#PCDATA)>
<!ELEMENT validator-id (#PCDATA)>
<!ELEMENT composite-component (description*, display-name*, icon*, component-type, composite-name, composite-file, facet*, group-type-ref*, attribute*, property*, property-type*, composite-extension*)>
<!ELEMENT composite-extension ANY>
<!ELEMENT property-type (description*, display-name*, icon*, property-name, property*, property-type*, property-extension*)>
<!ELEMENT group (description*, display-name*, icon*, group-type, group-type-ref*, property*, group-extension*)>
<!ELEMENT group-extension ANY>
<!ELEMENT render-kit (description*, display-name*, icon*, render-kit-id?, render-kit-class?, renderer*, render-kit-extension?)>
<!ELEMENT render-kit-extension ANY>
<!ELEMENT renderer (description*, display-name*, icon*, component-family, renderer-type, renderer-class, facet*, attribute*, renderer-extension*)>
<!ELEMENT renderer-extension ANY>
<!ELEMENT base-render-kit-id (#PCDATA)>
<!ELEMENT component-family (#PCDATA)>
<!ELEMENT composite-file (#PCDATA)>
<!ELEMENT composite-name (#PCDATA)>
<!ELEMENT group-type (#PCDATA)>
<!ELEMENT render-kit-alias (#PCDATA)>
<!ELEMENT renderer-type (#PCDATA)>
<!ELEMENT icon (small-icon?, large-icon?)>
<!ELEMENT small-icon (#PCDATA)>
<!ELEMENT large-icon (#PCDATA)>
<!-- Added 8 July 2013 -->
<!ELEMENT designer-extension (category, selected-event, event, visible, subcategory, in-palette, generate-id, render-markup, is-deprecated)>
<!ELEMENT category (#PCDATA)>
<!ELEMENT selected-event (#PCDATA)>
<!ELEMENT event (#PCDATA)>
<!ELEMENT visible (true|false)>
<!ELEMENT subcategory (#PCDATA)>
<!ELEMENT in-palette (true|false)>
<!ELEMENT generate-id (true|false)>
<!ELEMENT render-markup (#PCDATA)>
<!ELEMENT is-deprecated (true|false)>
将上述代码保存在 DTD 文件中,并将其包含在您xsp-config
使用以下代码中:
<!DOCTYPE faces-config PUBLIC
"-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
"D:\DTDs\xspconfig.dtd">