Package com.adobe.dp.xml.util

Examples of com.adobe.dp.xml.util.XMLSerializer.startElement()


    SMapImpl attrs = new SMapImpl();
    attrs.put(null, "version", "2.0");
    attrs.put(null, "unique-identifier", "bookid");
    ser.startElement(opfns, "package", attrs, true);
    ser.newLine();
    ser.startElement(opfns, "metadata", null, false);
    ser.newLine();
    Iterator it = epub.metadata.iterator();
    int identifierCount = 0;
    while (it.hasNext()) {
      Publication.SimpleMetadata item = (Publication.SimpleMetadata) it.next();
View Full Code Here


        value = Translit.translit(value);
      if (item.ns == null) {
        attrs = new SMapImpl();
        attrs.put(null, "name", item.name);
        attrs.put(null, "content", value);
        ser.startElement(opfns, "meta", attrs, false);
        ser.endElement(opfns, "meta");
        ser.newLine();
      } else {
        ser.startElement(item.ns, item.name, attrs, false);
        char[] arr = value.toCharArray();
View Full Code Here

        attrs.put(null, "content", value);
        ser.startElement(opfns, "meta", attrs, false);
        ser.endElement(opfns, "meta");
        ser.newLine();
      } else {
        ser.startElement(item.ns, item.name, attrs, false);
        char[] arr = value.toCharArray();
        ser.text(arr, 0, arr.length);
        ser.endElement(item.ns, item.name);
        ser.newLine();
      }
View Full Code Here

        ser.newLine();
      }
    }
    ser.endElement(opfns, "metadata");
    ser.newLine();
    ser.startElement(opfns, "manifest", null, false);
    ser.newLine();
    it = epub.resources();
    while (it.hasNext()) {
      Resource r = (Resource) it.next();
      if (r != this) {
View Full Code Here

      if (r != this) {
        attrs = new SMapImpl();
        attrs.put(null, "id", epub.assignId(r));
        attrs.put(null, "href", makeReference(r.getName(), null));
        attrs.put(null, "media-type", r.mediaType);
        ser.startElement(opfns, "item", attrs, false);
        ser.endElement(opfns, "item");
        ser.newLine();
      }
    }
    ser.endElement(opfns, "manifest");
View Full Code Here

    attrs = new SMapImpl();
    if (epub.toc != null)
      attrs.put(null, "toc", epub.assignId(epub.toc));
    if (epub.pageMap != null)
      attrs.put(null, "page-map", epub.assignId(epub.pageMap));
    ser.startElement(opfns, "spine", attrs, false);
    ser.newLine();
    it = epub.spine();
    while (it.hasNext()) {
      Resource r = (Resource) it.next();
        //[LC] improved: added the possibility to control from the outside de UUID     
View Full Code Here

      attrs=r.getSerializationAttributes();
      if(attrs==null){
        attrs = new SMapImpl();
      }
      attrs.put(null, "idref", epub.assignId(r));
      ser.startElement(opfns, "itemref", attrs, false);
      ser.endElement(opfns, "itemref");
      ser.newLine();
    }
    ser.endElement(opfns, "spine");
    ser.newLine();
View Full Code Here

    SMapImpl attrs = new SMapImpl();
    attrs.put(null, "version", "2005-1");
    String lang = epub.getDCMetadata("language");
    if (lang != null)
      attrs.put(null, "xml:lang", lang);
    ser.startElement(ncxns, "ncx", attrs, true);
    ser.newLine();
    ser.startElement(ncxns, "head", null, false);
    ser.newLine();
    attrs = new SMapImpl();
    attrs.put(null, "name", "dtb:uid");
View Full Code Here

    String lang = epub.getDCMetadata("language");
    if (lang != null)
      attrs.put(null, "xml:lang", lang);
    ser.startElement(ncxns, "ncx", attrs, true);
    ser.newLine();
    ser.startElement(ncxns, "head", null, false);
    ser.newLine();
    attrs = new SMapImpl();
    attrs.put(null, "name", "dtb:uid");
    String uid = epub.getDCMetadata("identifier");
    if (uid == null)
View Full Code Here

    attrs.put(null, "name", "dtb:uid");
    String uid = epub.getDCMetadata("identifier");
    if (uid == null)
      uid = "";
    attrs.put(null, "content", uid);
    ser.startElement(ncxns, "meta", attrs, false);
    ser.endElement(ncxns, "meta");
    ser.newLine();
    attrs = new SMapImpl();
    attrs.put(null, "name", "dtb:depth");
    int depth = calculateDepth(rootTOCEntry);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.