Skip to content
This repository has been archived by the owner on Jul 3, 2019. It is now read-only.

Commit

Permalink
Merge pull request #52 from ZackPierce/master
Browse files Browse the repository at this point in the history
Configuration xml schema
  • Loading branch information
tschneidereit committed Jun 14, 2011
2 parents f620ef4 + 684cf82 commit 05e527f
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.textile
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ In addition to injection points, @PostConstruct@ method annotations can be speci
The following example code contains all possible configuration options:

<pre>
<types>
<types xmlns="http://github.com/tschneidereit/SwiftSuspenders">
<type name='com.example.injectees::FirstInjectee'>
<field name='unnamedInjectionPoint'/>
<field name='namedInjectionPoint' injectionname='namedInjection'/>
Expand All @@ -200,13 +200,13 @@ The following example code contains all possible configuration options:
<method name='namedInjectionMethodWithOneArgument' injectionname='namedInjection'/>
<method name='namedInjectionMethodWithMultipleArguments'>
<arg injectionname='namedInjection'/>
<arg injectionname='namedInjection2' injectionname='namedInjection'/>
<arg injectionname='namedInjection2'/>
</method>
</type>
<type name='com.example.injectees::ThirdInjectee'>
<constructor>
<arg injectionname='namedInjection'/>
<arg injectionname='namedInjection2' injectionname='namedInjection'/>
<arg injectionname='namedInjection2'/>
</constructor>
</type>
</types>
Expand Down
53 changes: 53 additions & 0 deletions SwiftSuspendersConfigurationSchema.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://github.com/tschneidereit/SwiftSuspenders" elementFormDefault="qualified">
<xs:element name="types">
<xs:complexType>
<xs:sequence>
<xs:element name="type" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="field" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="name" type="xs:string" use="required" />
<xs:attribute name="injectionname" type="xs:string" use="optional" />
</xs:complexType>
</xs:element>
<xs:element name="postconstruct" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="name" type="xs:string" use="required" />
<xs:attribute name="order" type="xs:integer" use="optional" />
</xs:complexType>
</xs:element>
<xs:element name="method" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="arg">
<xs:complexType>
<xs:attribute name="injectionname" type="xs:string" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="name" type="xs:string" use="required" />
<xs:attribute name="injectionname" type="xs:string" use="optional" />
</xs:complexType>
</xs:element>
<xs:element name="constructor" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="arg">
<xs:complexType>
<xs:attribute name="injectionname" type="xs:string" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="name" type="xs:string" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

0 comments on commit 05e527f

Please sign in to comment.