Skip to main content
1-Visitor
April 15, 2014
Solved

DOCTYPE & Element attributes - Save As Preferences

  • April 15, 2014
  • 1 reply
  • 3389 views

Hi Chaps,

When saving an XML, the !DOCTYPE and also some element attributes are removed.

Is there a setting in Preferences > Advanced, to stop this occuring?

Thanks in advance,

Samuel

    Best answer by GarethOakes

    This doesn't happen here. I opened your sample XML in Free Form mode, without DTD, and did a Save As. The only differences are:

    1. the Arbortext comment

    2. single quotes turned to double quotes

    3. placement of a <?Pub Caret -2?> PI at end of document (marking where my cursor was when I saved)

    I tested on Arbortext 6.0 as I don't have 6.1 handy.

    1 reply

    16-Pearl
    April 16, 2014

    This should not happen, can you describe the steps which reproduce this behaviour?

    1-Visitor
    April 16, 2014

    Didn't think so, OK...here it goes...

    Open File 1:

    <?xml version='1.0' encoding='utf-8'?>

    <!DOCTYPE planungsanleitung PUBLIC '-//Client//DTD DocumentType//DE' '/system/dtd/planungsanleitung/planungsanleitung.dtd'>

    <planungsanleitung y.io.id="daf88359619038f0ac140e0e4de97dc5" y.io.version="6" y.io.variant="GB" y.io.language="en" y.io.format="ClientDocPAXML" y.io.owner="ksi" y.io.status="Approved" y.io.name="5368768" y.io.revision="8">

    <meta>

    </meta>

    </planungsanleitung>

    No validation error.

    Save As Result: all attributes are removed from planungsleitung element and copied to meta....and "?" are added to the DOCTYPE root element:

    <?xml version="1.0" encoding="UTF-8"?><!--Arbortext, Inc., 1988-2013, v.4002--><?DOCTYPE planungsanleitung PUBLIC "-//Client//DTD DocumentType//DE" "/system/dtd/planungsanleitung/planungsanleitung.dtd"?><planungsanleitung><meta y.io.format="ViessDocPAXML" y.io.id="daf88359619038f0ac140e0e4de97dc5" y.io.language="en" y.io.name="5368768" y.io.owner="ksi" y.io.revision="8" y.io.status="Approved" y.io.variant="GB" y.io.version="6"></meta></planungsanleitung><?Pub?>

    Any ideas?

    Thanks in advance.

    1-Visitor
    April 16, 2014

    Have you checked for any callbacks or save hooks in your custom folders? The functionality doesn't look out of the box for Arbortext.

    You can check in the /init or /scripts directories under your custom folders.

    -Jeff