Author: mgrigorov
Date: Thu May 19 18:54:43 2011
New Revision: 1125052
URL: http://svn.apache.org/viewvc?rev=1125052&view=rev
Log:
WICKET-3686 Provide an xml schema for the wicket tags and attributes
Added:
wicket/trunk/wicket-core/src/main/resources/META-INF/wicket-1.5.xsd
Added: wicket/trunk/wicket-core/src/main/resources/META-INF/wicket-1.5.xsd
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/main/resources/META-INF/wicket-1.5.xsd?rev=1125052&view=auto
==============================================================================
--- wicket/trunk/wicket-core/src/main/resources/META-INF/wicket-1.5.xsd (added)
+++ wicket/trunk/wicket-core/src/main/resources/META-INF/wicket-1.5.xsd Thu May
19 18:54:43 2011
@@ -0,0 +1,272 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://wicket.apache.org"
+ xmlns:wicket="http://wicket.apache.org" elementFormDefault="qualified"
+ version="1.5">
+
+ <!-- types -->
+
+ <simpleType name="token">
+ <annotation>
+ <documentation>An extension of standard token type with
the
+ restriction of collapsing white space, which
means that the XML
+ processor WILL REMOVE all white space
characters (line feeds, tabs,
+ spaces, carriage returns are replaced with
spaces, leading and
+ trailing spaces are removed, and multiple
spaces are reduced to a
+ single space).</documentation>
+ </annotation>
+ <restriction base="token">
+ <whiteSpace value="collapse" />
+ </restriction>
+ </simpleType>
+
+ <simpleType name="notEmptyToken">
+ <annotation>
+ <documentation>Extends wicket:token type with the
restriction that
+ the value can not be empty.</documentation>
+ </annotation>
+ <restriction base="wicket:token">
+ <minLength value="1" />
+ </restriction>
+ </simpleType>
+
+ <complexType name="mixedContent" mixed="true">
+ <annotation>
+ <documentation>A complex type that allows any amount of
mixed child
+ content from any origin.</documentation>
+ </annotation>
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <any namespace="##targetNamespace"
processContents="strict" />
+ <any namespace="##other" processContents="lax" />
+ </choice>
+ </complexType>
+
+ <complexType name="notEmptyMixedContent" mixed="true">
+ <annotation>
+ <documentation>Extends wicket:mixedContent with the
restriction that
+ at least one child element must be
given.</documentation>
+ </annotation>
+ <choice minOccurs="1" maxOccurs="unbounded">
+ <any namespace="##targetNamespace"
processContents="strict" />
+ <any namespace="##other" processContents="lax" />
+ </choice>
+ </complexType>
+
+ <!-- attributes -->
+
+ <attribute name="enclosure">
+ <annotation>
+ <documentation>This attribute is useful for filtering
markup that
+ surrounds a component but has its visibility
dependent on the
+ visibility of that component. It is similar to
the wicket:enclosure
+ tag. The value is the wicket:id of the
dependent component. No value
+ can be used if there is only one nested wicket
component.
+ "foo:bar:baz" format can be used to specify a
nested path.
+ </documentation>
+ </annotation>
+ <simpleType>
+ <restriction base="wicket:token">
+ <pattern value="([^:]+(:[^:]+)*)?" />
+ </restriction>
+ </simpleType>
+ </attribute>
+
+ <attribute name="id" type="wicket:notEmptyToken">
+ <annotation>
+ <documentation>The wicket component id. Used on any
element to which
+ you want to add a component.</documentation>
+ </annotation>
+ </attribute>
+
+ <attribute name="message">
+ <annotation>
+ <documentation>Used on any tag that we want Wicket to
provide an
+ attribute with a value that's the result of a
resource lookup.
+ Format: "att1:key1,att2:key2", where att1, att2
are attribute names
+ and key1, key2 are resource id-s.
+ </documentation>
+ </annotation>
+ <simpleType>
+ <restriction base="wicket:notEmptyToken">
+ <pattern value="[^:,]+:[^:,]+(,[^:,]+:[^:,]+)*"
/>
+ </restriction>
+ </simpleType>
+ </attribute>
+
+ <!-- elements -->
+
+ <element name="body">
+ <annotation>
+ <documentation>Used with wicket:border to specify the
location of the
+ original content.</documentation>
+ </annotation>
+ <complexType />
+ </element>
+
+ <element name="border" type="wicket:notEmptyMixedContent">
+ <annotation>
+ <documentation>Specifies bordering content for a
wicket:body.
+ </documentation>
+ </annotation>
+ <unique name="borderWicketId">
+ <selector xpath="./*" />
+ <field xpath="@wicket:id" />
+ </unique>
+ </element>
+
+ <element name="child">
+ <annotation>
+ <documentation>Wicket will replace this content with
the markup of
+ the derived component (see
wicket:extend).</documentation>
+ </annotation>
+ <complexType />
+ </element>
+
+ <element name="container">
+ <annotation>
+ <documentation>A tag to which you can attach a wicket
component but
+ it will not produce a html tag in the
result.</documentation>
+ </annotation>
+ <complexType mixed="true">
+ <complexContent>
+ <extension base="wicket:mixedContent">
+ <attribute ref="wicket:id"
use="required" />
+ </extension>
+ </complexContent>
+ </complexType>
+ <unique name="containerWicketId">
+ <selector xpath="./*" />
+ <field xpath="@wicket:id" />
+ </unique>
+ </element>
+
+ <element name="enclosure">
+ <annotation>
+ <documentation>This tag is useful for filtering markup
that surrounds
+ a component but has its visibility dependent on
the visibility of
+ that component. It is similar to the
wicket:enclosure attribute.
+ </documentation>
+ </annotation>
+ <complexType mixed="true">
+ <complexContent>
+ <extension base="wicket:notEmptyMixedContent">
+ <attribute name="child" use="optional">
+ <annotation>
+
<documentation>Specifies the wicket:id of the dependent
+ component. This
attribute can be omitted if there is only one
+ nested wicket
component. "foo:bar:baz" format can be used to
+ specify a
nested path.</documentation>
+ </annotation>
+ <simpleType>
+ <restriction
base="wicket:notEmptyToken">
+ <pattern
value="[^:]+(:[^:]+)*" />
+ </restriction>
+ </simpleType>
+ </attribute>
+ </extension>
+ </complexContent>
+ </complexType>
+ <unique name="enclosureWicketId">
+ <selector xpath="./*" />
+ <field xpath="@wicket:id" />
+ </unique>
+ </element>
+
+ <element name="extend" type="wicket:mixedContent">
+ <annotation>
+ <documentation>Extend the markup of the superclass with
this content.
+ Used together with wicket:child.</documentation>
+ </annotation>
+ <unique name="extendWicketId">
+ <selector xpath="./*" />
+ <field xpath="@wicket:id" />
+ </unique>
+ </element>
+
+ <element name="fragment">
+ <annotation>
+ <documentation>Is similar to wicket:panel but it is
declared in the
+ parent's markup instead of in a separate markup
file.
+ </documentation>
+ </annotation>
+ <complexType mixed="true">
+ <complexContent>
+ <extension base="wicket:mixedContent">
+ <attribute ref="wicket:id"
use="required" />
+ </extension>
+ </complexContent>
+ </complexType>
+ <unique name="fragmentWicketId">
+ <selector xpath="./*" />
+ <field xpath="@wicket:id" />
+ </unique>
+ </element>
+
+ <element name="head" type="wicket:mixedContent">
+ <annotation>
+ <documentation>Used for header contributions. Using
this, panels can
+ add header sections to the pages they are
placed on.</documentation>
+ </annotation>
+ <unique name="headWicketId">
+ <selector xpath="./*" />
+ <field xpath="@wicket:id" />
+ </unique>
+ </element>
+
+ <element name="link" type="wicket:mixedContent">
+ <annotation>
+ <documentation>Support for wicket's autolink
functionality. Normally,
+ you need to add a component (for example, a
BookmarkablePageLink)
+ for each link that Wicket manages. Using the
wicket:link tag will
+ automatically do this in the background for
you.</documentation>
+ </annotation>
+ <unique name="linkWicketId">
+ <selector xpath="./*" />
+ <field xpath="@wicket:id" />
+ </unique>
+ </element>
+
+ <element name="message">
+ <annotation>
+ <documentation>Wicket will replace this with a string
that is
+ retrieved from a resource
bundle.</documentation>
+ </annotation>
+ <complexType mixed="true">
+ <complexContent>
+ <extension base="wicket:mixedContent">
+ <attribute name="key" use="required"
type="wicket:notEmptyToken">
+ <annotation>
+ <documentation>The
resource id used for lookup.</documentation>
+ </annotation>
+ </attribute>
+ </extension>
+ </complexContent>
+ </complexType>
+ <unique name="messageWicketId">
+ <selector xpath="./*" />
+ <field xpath="@wicket:id" />
+ </unique>
+ </element>
+
+ <element name="panel" type="wicket:mixedContent">
+ <annotation>
+ <documentation>The wicket:panel tag surrounds a
component. This lets
+ you wrap the component with HTML and BODY tags
(so it can be
+ displayed in a browser) but, when you include
it, only the content
+ inside the wicket:panel tag is actually
included.</documentation>
+ </annotation>
+ <unique name="panelWicketId">
+ <selector xpath="./*" />
+ <field xpath="@wicket:id" />
+ </unique>
+ </element>
+
+ <element name="remove" type="wicket:mixedContent">
+ <annotation>
+ <documentation>Wicket will remove this content in the
final markup.
+ This is useful for when you want your web
designer to be able to
+ show repeated content when they're working on
it, but you want to
+ generate that content using a ListView (or
other loop).
+ </documentation>
+ </annotation>
+ </element>
+</schema>
\ No newline at end of file