Skip to main content
1-Visitor
January 23, 2014
Question

Get Arbortext Editor to insert the default attribute vaules into the xml

  • January 23, 2014
  • 3 replies
  • 1081 views
Hi,

Is it possible for Arbortext Editor to insert the default attribute values into the XML. So that if I open the xml in notepad, the default attributes are there.

Thank you
Ashona

    3 replies

    1-Visitor
    January 23, 2014

    Hi Ashona - You can use the writeunspecifiedattrs setting, but there are caveats...


    "set writeunspecifiedattrs={ none | fixed | all}

    The set writeunspecifiedattrs command controls the writing of unspecified attributes. An unspecified attribute is any element attribute that does not have a user-defined value. Attributes that have a default value set in the Document Type Definition (DTD) but have not been set using the Arbortext Editor user interface are also considered unspecified.

    The default setting is none, which means that Arbortext Editor will not write unspecified attributes when saving a file. When set to fixed, Arbortext Editor writes only the unspecified fixed attributes when saving a file. When set to all, Arbortext Editor writes all unspecified attributes, except for CDATA attributes, when saving a file. Note that the fixed and all settings both significantly increase the size of the written file.

    Arbortext recommends that you do not use this command unless you need to write an instance of a file for an application that does not read attributes from a DTD. If you save a document with unspecified attributes and then re-open the document with Arbortext Editor, Arbortext Editor will display the attributes as local modifications."
    1-Visitor
    January 24, 2014
    Hi Lisa,

    Thank you

    Ashona
    1-Visitor
    January 27, 2014

    Hi Ashona,


    An ACL script could do this as well and it could be made to only modify the attributes that you want. The script could run at a given event or at the user's command.


    -Jeff