Ejemplo n.º 1
0
 public Leaf makeElement(
     NameClass nameClass, Leaf leaf, LocatorImpl locator, AnnotationsImpl annotations)
     throws BuildException {
   Leaf r = null;
   for (QName n : nameClass.listNames()) {
     Leaf l = new Element(locator, n, leaf);
     if (r != null) r = r.merge(l);
     else r = l;
   }
   if (r == null) return new Empty(locator);
   return r;
 }
Ejemplo n.º 2
0
 public Leaf makeMixed(Leaf leaf, LocatorImpl locator, AnnotationsImpl annotations)
     throws BuildException {
   return leaf.merge(new Data(locator, string));
 }
Ejemplo n.º 3
0
 public Leaf makeOptional(Leaf leaf, LocatorImpl locator, AnnotationsImpl annotations)
     throws BuildException {
   return leaf.merge(new Empty(locator));
 }