OpenCms 定义内容结构
一般结构:
<xsd:complexType name="OpenCmsBootstrapBlog">
<xsd:sequence>
<xsd:element name="Title" type="OpenCmsString" />
<xsd:element name="Date" type="OpenCmsDateTime" />
<xsd:element name="Teaser" type="OpenCmsString" minOccurs="0" />
<xsd:element name="Paragraph" type="OpenCmsBootstrapParagraph" maxOccurs="5" />
<xsd:element name="Category" type="OpenCmsCategory" minOccurs="0" />
<xsd:element name="Author" type="OpenCmsString" />
<xsd:element name="AuthorMail" type="OpenCmsString" minOccurs="0" />
<xsd:element name="Availability" type="OpenCmsBootstrapAvailability" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="language" type="OpenCmsLocale" use="required" />
</xsd:complexType>
每个架构元素必须拥有name和type属性,可选属性有minOccurs和maxOccurs,默认都为1。
minOccurs: 最小出现次数,可为0,为0时表示该元素可选。maxOccurs: 最大出现次数。type: 模式类型。
基本模式类型:
OpenCmsBoolean: 存储一个布尔值,true 或 false。OpenCmsCategory: 存储多个类别。OpenCmsColor: 存储颜色值。OpenCmsHtml: 存储带有HTML标记的字符串。OpenCmsLocale: 存储语言环境名称。OpenCmsPlainTextString: 在索引搜索值时存储任意字符串并删除HTML标记。OpenCmsString: 存储字符串。OpenCmsDateTime: 将时间戳存储为long int类型。OpenCmsVarLink: 存储内部和外部链接。OpenCmsVfsFile: 存储指向VFS资源的链接,即内部链接。OpenCmsVfsImage: 存储指向图像的链接和图像上的一些额外信息。

浙公网安备 33010602011771号