Mark Fletcher wrote: > Our CMS product writes in all default DTD attribute values when > persisting documents to the db. 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.” > 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. >
[email protected] wrote: > 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. I'm sorry but after further analysis we have decided not to implement what's described above. Let's explain the rationale of our decision by using an example. We have an unordered list having an explicit class attribute added by your CMS: <ul class="- topic/ul ">... The Edit|Convert command allows to convert the unordered list to an ordered list. This gives us: [a] <ol class="- topic/ul ">... One would expect to get: [b] <ol>... or: [c] <ol class="- topic/ol ">... In fact, the Edit|Convert command works exactly as specified by the DITA topic DTD, and as such, there is nothing we can fix or improve here. If the class attribute was declared as being #FIXED, the Edit|Convert command[*] would have generated form [b]. Unfortunately for you, the class attribute is not declared as being #FIXED for the following reason[**]: http://docs.oasis-open.org/dita/v1.1/OS/archspec/classatt.html --- The class attribute value is provided as a default value that can be overridden and is not fixed. The ability to change the class attribute becomes important for mapping persistence through migration: when you migrate content to a more abstract element, you can preserve its more specialized history in the class attribute, allowing round-tripping of content between more specialized and more general representations, so it can be processed by different applications at whichever level they understand or support. --- --- [*] Starting from next XXE release due to a limitation we have removed. [**] If you understand this, you are smarter than me. -- XMLmind XML Editor Support List [email protected] http://www.xmlmind.com/mailman/listinfo/xmleditor-support

