X4O: Formatted the SAX3 package to eclipse-160 (code+comment)
This commit is contained in:
parent
2819b36a45
commit
a61ce241e1
26 changed files with 1192 additions and 909 deletions
|
|
@ -20,7 +20,7 @@
|
|||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
package org.x4o.sax3;
|
||||
package org.x4o.sax3;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.Writer;
|
||||
|
|
@ -35,23 +35,23 @@ import org.xml.sax.helpers.AttributesImpl;
|
|||
* @author Willem Cazander
|
||||
* @version 1.0 May 3, 2013
|
||||
*/
|
||||
public class SAX3WriterXsd extends SAX3WriterEnum<SAX3WriterXsd.Tag,SAX3WriterXml> {
|
||||
|
||||
public class SAX3WriterXsd extends SAX3WriterEnum<SAX3WriterXsd.Tag, SAX3WriterXml> {
|
||||
|
||||
public SAX3WriterXsd(Writer out, String encoding) {
|
||||
super(new SAX3WriterXml(out, encoding), SAX3XMLConstants.XML_SCHEMA_NS_URI, SAX3XMLConstants.NULL_NS_URI);
|
||||
}
|
||||
|
||||
|
||||
public SAX3PropertyConfig getPropertyConfig() {
|
||||
return getContentWriterWrapped().getPropertyConfig();
|
||||
}
|
||||
|
||||
|
||||
public void printXsdImport(String namespace, String schemaLocation) throws IOException {
|
||||
AttributesImpl atts = new AttributesImpl();
|
||||
atts.addAttribute("", "namespace", "", "", namespace);
|
||||
atts.addAttribute("", "schemaLocation", "", "", schemaLocation);
|
||||
printTagStartEnd(Tag._import, atts);
|
||||
}
|
||||
|
||||
|
||||
public void printXsdDocumentation(String description) throws IOException {
|
||||
if (description == null) {
|
||||
return;
|
||||
|
|
@ -64,7 +64,7 @@ public class SAX3WriterXsd extends SAX3WriterEnum<SAX3WriterXsd.Tag,SAX3WriterXm
|
|||
printTagEnd(Tag.documentation);
|
||||
printTagEnd(Tag.annotation);
|
||||
}
|
||||
|
||||
|
||||
public void printXsdElementAttribute(String name, String type, String description) throws IOException {
|
||||
AttributesImpl atts = new AttributesImpl();
|
||||
atts.addAttribute("", "name", "", "", name);
|
||||
|
|
@ -73,12 +73,37 @@ public class SAX3WriterXsd extends SAX3WriterEnum<SAX3WriterXsd.Tag,SAX3WriterXm
|
|||
printXsdDocumentation(description);
|
||||
printTagEnd(Tag.attribute);
|
||||
}
|
||||
|
||||
|
||||
public enum Tag {
|
||||
all,annotation,any,anyAttribute,appinfo,attribute,attributeGroup,
|
||||
choice,complexContent,complexType,documentation,element,extension,
|
||||
field,group,_import,include,key,keyref,list,notation,
|
||||
redefine,restriction,schema,selector,sequence,
|
||||
simpleContent,simpleType,unoin,unique
|
||||
all,
|
||||
annotation,
|
||||
any,
|
||||
anyAttribute,
|
||||
appinfo,
|
||||
attribute,
|
||||
attributeGroup,
|
||||
choice,
|
||||
complexContent,
|
||||
complexType,
|
||||
documentation,
|
||||
element,
|
||||
extension,
|
||||
field,
|
||||
group,
|
||||
_import,
|
||||
include,
|
||||
key,
|
||||
keyref,
|
||||
list,
|
||||
notation,
|
||||
redefine,
|
||||
restriction,
|
||||
schema,
|
||||
selector,
|
||||
sequence,
|
||||
simpleContent,
|
||||
simpleType,
|
||||
unoin,
|
||||
unique
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue