sandygao 2004/04/13 17:52:26
Modified: java/samples/xni PSVIWriter.java
Log:
Committing Mike Boos' PSVI writer patches to fix various problems.
Revision Changes Path
1.28 +14 -7 xml-xerces/java/samples/xni/PSVIWriter.java
Index: PSVIWriter.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/samples/xni/PSVIWriter.java,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- PSVIWriter.java 12 Apr 2004 20:13:42 -0000 1.27
+++ PSVIWriter.java 14 Apr 2004 00:52:25 -0000 1.28
@@ -1152,8 +1152,11 @@
}
private void processPSVISimpleTypeDefinition(XSSimpleTypeDefinition type) {
- if (type == null)
+ if (type == null) {
+ sendElementEvent("psv:simpleTypeDefinition");
return;
+ }
+
sendIndentedElementWithID("psv:simpleTypeDefinition", type);
sendElementEvent("psv:name", type.getName());
sendElementEvent("psv:targetNamespace", type.getNamespace());
@@ -1763,8 +1766,10 @@
private void processPSVITypeDefinitionRef(
String enclose,
XSTypeDefinition type) {
- if (type == null)
+ if (type == null) {
+ sendElementEvent(enclose);
return;
+ }
sendIndentedElement(enclose);
if (type.getTypeCategory() == XSTypeDefinition.COMPLEX_TYPE) {
@@ -1785,8 +1790,10 @@
private void processPSVITypeDefinitionOrRef(
String enclose,
XSTypeDefinition type) {
- if (type == null)
+ if (type == null){
+ sendElementEvent(enclose);
return;
+ }
// we'll check for anonymous types here, since they only occur in places
where
// a reference would be appropriate
@@ -2188,17 +2195,17 @@
if ((val & XSConstants.DERIVATION_RESTRICTION) != 0) {
if (ret.length() != 0)
ret += " ";
- ret += SchemaSymbols.ATTVAL_RESTRICTION + " ";
+ ret += SchemaSymbols.ATTVAL_RESTRICTION;
}
if ((val & XSConstants.DERIVATION_UNION) != 0) {
if (ret.length() != 0)
ret += " ";
- ret += SchemaSymbols.ATTVAL_UNION + " ";
+ ret += SchemaSymbols.ATTVAL_UNION;
}
if ((val & XSConstants.DERIVATION_SUBSTITUTION) != 0) {
if (ret.length() != 0)
ret += " ";
- ret += SchemaSymbols.ATTVAL_SUBSTITUTION + " ";
+ ret += SchemaSymbols.ATTVAL_SUBSTITUTION;
}
return ret;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]