Mark Fletcher wrote:
> Our CMS product writes in all default DTD attribute values when
> persisting documents to the db. 

I don't see the usefulness of doing this.



> This means that our @class attributes
> end up having actual values. When using XXE’s Convert command, the
> element name is switched, but the @class attribute value remains the
> same, which causes the new element to be misidentified during the
> @class-based XSL transforms.
> 
>  
> 
> I see that the treatment of attributes during Convert is clearly
> documented: “When a single element is selected, all its children (but
> not its attributes) are transferred to the result of the conversion.”

The documentation is not up to date.

As of v4.3.0 (April 10, 2009):
---
An element created using Edit|Convert now has a copy of the attributes
of the element having been converted (as always, when allowed by the
schema). Example: converting a <td valign="top"> to a th gives <th
valign="top">.
---
See http://www.xmlmind.com/xmleditor/changes.html#v4.3.0



> But do you see this as something that XXE should make allowances for,
> given the strong association between element name and @class value in
> DITA? For example, perhaps the configuration could let you define
> attributes to be stripped during Convert, or something similar.

We'll try to implement the following heuristic in next release:

Copy attribute A from convertee E1 to converted E2:
[a] if the schema allows E2 to have an A attribute,
[b] AND if attribute A has the same data type and the same default value
(or absence of default value) for both E1 and E2.

Rule [b] will be new to next release.




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

Reply via email to