Package com.adobe.dp.xml.util

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


      res.serialize(out);
    }
    if (needEnc) {
      XMLSerializer ser = new XMLSerializer(container.getOutputStream("META-INF/encryption.xml"));
      ser.startDocument("1.0", "UTF-8");
      ser.startElement(ocfns, "encryption", null, true);
      ser.newLine();
      names = resourcesByName.keys();
      while (names.hasMoreElements()) {
        String name = (String) names.nextElement();
        Resource res = (Resource) resourcesByName.get(name);
View Full Code Here


      while (names.hasMoreElements()) {
        String name = (String) names.nextElement();
        Resource res = (Resource) resourcesByName.get(name);
        if (res instanceof FontResource) {
          SMapImpl attrs = new SMapImpl();
          ser.startElement(encns, "EncryptedData", null, true);
          ser.newLine();
          if (useIDPFFontMangling)
            attrs.put(null, "Algorithm", "http://www.idpf.org/2008/embedding");
          else
            attrs.put(null, "Algorithm", "http://ns.adobe.com/pdf/enc#RC");
View Full Code Here

          ser.newLine();
          if (useIDPFFontMangling)
            attrs.put(null, "Algorithm", "http://www.idpf.org/2008/embedding");
          else
            attrs.put(null, "Algorithm", "http://ns.adobe.com/pdf/enc#RC");
          ser.startElement(encns, "EncryptionMethod", attrs, false);
          ser.endElement(encns, "EncryptionMethod");
          ser.newLine();
          ser.startElement(encns, "CipherData", null, false);
          ser.newLine();
          attrs = new SMapImpl();
View Full Code Here

          else
            attrs.put(null, "Algorithm", "http://ns.adobe.com/pdf/enc#RC");
          ser.startElement(encns, "EncryptionMethod", attrs, false);
          ser.endElement(encns, "EncryptionMethod");
          ser.newLine();
          ser.startElement(encns, "CipherData", null, false);
          ser.newLine();
          attrs = new SMapImpl();
          attrs.put(null, "URI", name);
          ser.startElement(encns, "CipherReference", attrs, false);
          ser.endElement(encns, "CipherReference");
View Full Code Here

          ser.newLine();
          ser.startElement(encns, "CipherData", null, false);
          ser.newLine();
          attrs = new SMapImpl();
          attrs.put(null, "URI", name);
          ser.startElement(encns, "CipherReference", attrs, false);
          ser.endElement(encns, "CipherReference");
          ser.newLine();
          ser.endElement(encns, "CipherData");
          ser.newLine();
          ser.endElement(encns, "EncryptedData");
View Full Code Here

    }
    XMLSerializer ser = new XMLSerializer(container.getOutputStream("META-INF/container.xml"));
    ser.startDocument("1.0", "UTF-8");
    SMapImpl attrs = new SMapImpl();
    attrs.put(null, "version", "1.0");
    ser.startElement(ocfns, "container", attrs, true);
    ser.newLine();
    ser.startElement(ocfns, "rootfiles", null, false);
    ser.newLine();
    attrs = new SMapImpl();
    attrs.put(null, "full-path", opf.name);
View Full Code Here

    ser.startDocument("1.0", "UTF-8");
    SMapImpl attrs = new SMapImpl();
    attrs.put(null, "version", "1.0");
    ser.startElement(ocfns, "container", attrs, true);
    ser.newLine();
    ser.startElement(ocfns, "rootfiles", null, false);
    ser.newLine();
    attrs = new SMapImpl();
    attrs.put(null, "full-path", opf.name);
    attrs.put(null, "media-type", opf.mediaType);
    ser.startElement(ocfns, "rootfile", attrs, true);
View Full Code Here

    ser.startElement(ocfns, "rootfiles", null, false);
    ser.newLine();
    attrs = new SMapImpl();
    attrs.put(null, "full-path", opf.name);
    attrs.put(null, "media-type", opf.mediaType);
    ser.startElement(ocfns, "rootfile", attrs, true);
    ser.endElement(ocfns, "rootfile");
    ser.newLine();
    ser.endElement(ocfns, "rootfiles");
    ser.newLine();
    ser.endElement(ocfns, "container");
View Full Code Here

        public void startElement(String ns, String local, String qname, Attributes attrs) throws SAXException {
          SMapImpl smap = new SMapImpl(new SMapAttributesAdapter(attrs));
          styler.pushElement(ns, local, smap);
          BaseRule es = styler.getCascadeResult().getProperties().getPropertySet();
          smap.put(null, "style", (es.isEmpty() ? null : es.toString()));
          ser.startElement(ns, local, smap, qname.indexOf(':') < 0);
        }

        public void startPrefixMapping(String arg0, String arg1) throws SAXException {
        }
View Full Code Here

    nsmap.put(null, "xsi", xsins);
    ser.setPreferredPrefixMap(nsmap);
    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;
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.