On 01/16/2012 08:58 PM, Fabián Mandelbaum wrote:
>
> I was wondering if it's possible that XXE suggestions for file names,
> when saving a new file, are improved a bit.
>
> Current XXE behaviour is to offer the name "Untitled" plus the
> extension according to the file's type. So you end up with
> Untitled.xml (DocBook), Untitled.dita (DITA), etc.
>
> Desired XXE behaviour is to check for the presence of an xml:id, or
> id, or equivalent, attribute on the root element (probably searching
> for an attribute named 'id' on the root element, ignoring the
> namespace would suffice...), and if that attribute is present (meaning
> it has a value set), offer the value of that attribute plus the
> extension according to the file's type, as the new file name.
>
> So, say you create a DITA topic, and assign an id of "legalnotice" to
> its root element, XXE would suggest (if this RFE ever sees the light
> as an implemented feature) "legalnotice.dita" instead of
> "Untitled.dita" when you hit the Save button.
>
> Of course, nothing would prevent you to specify the name you want,
> like you can do right now.
>
> Maybe this RFE is very specific, or not useful for someone else, other
> than me, or even it has other, undesired, consequences if it's
> implemented. If so, I'll understand if it never sees the light as an
> implemented feature.
>

DocBook:

I don't think that DocBook authors bother giving  an ID to the root 
elements of their documents. This is never strictly needed, even when 
one uses olinks or xincludes.

DITA:

In our experience, DITA authors tend to never specify the id attribute 
of a topic. In such case, XXE computes an id for topic file save time. 
For that, it uses the filename chosen by the author.

Some DITA experts even recommend to use document templates where the id 
attribute is always set to "topic". (Surprising, isn't it?) Of course, 
they also recommend to have a single topic per file, otherwise this 
recommendation wouldn't work.

In summary, your RFE would be truly useful in an ideal world where 
authors systematically give a sensible value to the ID attribute of the 
root element of their documents.


 
--
XMLmind XML Editor Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support

Reply via email to