Skip to content

Commit

Permalink
Created a SiteMesh XSD for version 3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
rburton authored and sitemesh committed Jan 20, 2010
1 parent 6413819 commit 020b371
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions sitemesh/src/main/resources/org/sitemesh/sitemesh3.xsd
@@ -0,0 +1,52 @@
<?xml version="1.0"?>
<xsd:schema targetNamespace="http://sitemesh.org/xml/config"
xmlns:config="http://sitemesh.org/xml/config"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
version="3.0.0">

<xsd:element name="sitemesh">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="mapping"
type="config:mapping"
minOccurs="0"/>

This comment has been minimized.

Copy link
@jeslopalo

jeslopalo Jun 2, 2011

I think that a maxOccurs="unbounded" is needed in mapping element definition.

<xsd:element name="content-processor"
type="config:content-processor"
minOccurs="0"/>
<xsd:element name="mime-type" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="source-dir" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="dest-dir" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>

<xsd:attributeGroup name="mapping-attribute-group">
<xsd:attribute name="path" type="xsd:string"/>
<xsd:attribute name="decorator" type="xsd:string"/>
<xsd:attribute name="exclude" type="xsd:boolean" default="false"/>
</xsd:attributeGroup>

<xsd:complexType name="mapping">
<xsd:sequence>

This comment has been minimized.

Copy link
@jeslopalo

jeslopalo Jun 2, 2011

I think that this sequence should be optional (ie. minOccurs="0")

<xsd:element name="path" type="xsd:string"/>
<xsd:element name="decorator" type="xsd:string"/>
</xsd:sequence>
<xsd:attributeGroup ref="mapping-attribute-group"/>

This comment has been minimized.

Copy link
@jeslopalo

jeslopalo Jun 2, 2011

i think that a "config:" in ref is needed!

[xsd:attributeGroup ref="config:mapping-attribute-group" /]

</xsd:complexType>

<xsd:complexType name="content-processor">
<xsd:sequence>
<xsd:element ref="config:tag-rule-bundle"/>
</xsd:sequence>
<xsd:attribute name="class" type="xsd:string"/>
</xsd:complexType>

<xsd:element name="tag-rule-bundle">
<xsd:complexType>
<xsd:attribute name="class" type="xsd:string"/>
</xsd:complexType>
</xsd:element>

</xsd:schema>

3 comments on commit 020b371

@joewalnes
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rburton - can you verify these comments and update?

-j

@rburton
Copy link
Member Author

@rburton rburton commented on 020b371 Jun 5, 2011 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rburton
Copy link
Member Author

@rburton rburton commented on 020b371 Jun 7, 2011 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.