Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4509181

Default XSL Transform creates improper DOCTYPE node

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • None
    • 1.4.1
    • xml



      Name: bsT130419 Date: 10/01/2001


      java version "1.4.0-beta2"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta2-b77)
      Java HotSpot(TM) Client VM (build 1.4.0-beta2-b77, mixed mode)

          javax.xml.transform

      Consider the following code:

      Transformer t = TransformerFactory.newInstance().newTransformer();

            t.setOutputProperty("doctype-public", "http://www.w3.org/TR/2000/CR-SVG-20000802/DTD/svg-20000802.dtd" );
            t.setOutputProperty("doctype-system", "-//W3C//DTD SVG 20000802//EN");

            t.transform(new DOMSource(doc), new StreamResult(new FileOutputStream(f)));

      It produces a DOCTYPE node

      <!DOCTYPE svg PUBLIC "http://www.w3.org/TR/2000/CR-SVG-20000802/DTD/svg-20000802.dtd" "-//W3C//DTD SVG 20000802//EN">

      when it should produce

      <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20000802//EN" "http://www.w3.org/TR/2000/CR-SVG-20000802/DTD/svg-20000802.dtd">

      That is, the public and system identifier are in the wrong order.
      (Review ID: 132864)
      ======================================================================

            duke J. Duke
            bstrathesunw Bill Strathearn (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: