OK. I confirm that we'll add to add-attribute-button() the option described below.
Marc van Grootel wrote: > Hi Hussein, > > We discussed this and yes we are interested in adding the default > attribute value feature to the add-attribute-button. In the meantime > (until that new release) we will add a Schematron rule to warn the > authors about the invalid "???" value in case they miss it. > > Regards, > --Marc > > > > iCtrl | M. van Grootel | Gutenbergweg 1 | 4104 BA Culemborg > T: +31 (0)345 62 01 99 | M: +31 (0)6 20 41 26 66 | F: +31 (0)345 51 08 > 67-----Oorspronkelijk bericht----- > Van: Hussein Shafie [mailto:hussein at xmlmind.com] > Verzonden: Friday, January 15, 2010 11:18 AM > Aan: Marc van Grootel > CC: xmleditor-support at xmlmind.com > Onderwerp: Re: [XXE] DTD default attribute values > > Marc van Grootel wrote: >> We encountered something that seemed counterintuitive for us and we > would like to know what would be the best approach to resolve it. > > "???" is here on purpose to *force* the user to specify an actual value. > Systematically choosing the default attribute value may be a very bad > idea for some applications (but probably not yours). > > > >> We have a CSS stylesheet that imports xmldata.css > (xxe-config:common/css/xmldata.css). In that CSS the > add-attribute-button is used to easily insert an attribute (using the + > icon). This inserts the attribute using "???" as the value. In our case > we have a DTD that uses a default attribute value. What we would like to > achieve is that when an attribute is inserted that it uses this default > value as the default selection for the dropdown or radio buttons. > > You shouldn't take xmldata.css too seriously. This CSS stylesheet is > primarily meant to be used in prototypes and demos. > > > >> For example: >> >> We have an attribute checktype with the following definition: >> >> checktype (checkbox | textbox) "checkbox" >> >> In our xmldata based view we can then add the checktype attribute and > this will show radio buttons for "checkbox" and "textbox". However it > shows "checkbox" selected (as if this is the current value) but the > attribute inspector shows the value "???". This confuses the authors > that do not look at the attribute inspector and they conclude, based on > what they see in the view, that "checkbox" is selected as the value. >> Is there any generic way that we could add such an attribute with a > default value equal to the DTD default value? >> We could start overriding all the places that need this behaviour but > would like to know if there is a better and generic solution for it. > > There is currently no way to tell add-attribute-button() to use the > default attribute value, if any. See > http://www.xmlmind.com/xmleditor/_distrib/doc/csssupport/add-attribute-b > utton.html > > *If* you are interested and *if* you can wait for next release > (~February 2010), we can add such option to add-attribute-button(). > > If this is implemented, you'll have to slightly modify xmldata.css: > > --- > ... > " ", > convert-button(tool-tip, "Convert"), > " ", > delete-button(tool-tip, "Delete"), > " ", > add-attribute-button( > check-has-attributes, yes, > use-default-attribute-value, yes, > color, navy, > tool-tip, "Add Attribute")), > ... > --- > > Please confirm that you are interested, otherwise we'll not add this > option to add-attribute-button(). > > > > > > Handelsregister KvK Rivierenland 11063591 | Chamber of Commerce Rivierenland > 11063591 > > > > > Let op : Dit e-mailbericht is slechts bestemd voor de persoon of organisatie > aan wie het is gericht. Het bericht kan informatie bevatten die persoonlijk > of vertrouwelijk is. Voor het geval de ontvanger van dit bericht niet de > bedoelde persoon of organisatie is, wordt hierbij vermeld, dat verdere > verspreiding, openbaarmaking of vermenigvuldiging van dit bericht strikt > verboden is en verzoeken wij u de inhoud niet te gebruiken en de afzender > direct per mail/fax te informeren. Dank voor uw medewerking. > > Important Notice: This E-mail is confidential, may be legally privileged and > is for the intended recipient only. Access, disclosure, copying, distribution > or reliance on any of it by anyone else is prohibited and may be a criminal > offence. Please delete if obtained in error and be kind enough to e-mail > confirmation to sender. > > -- > XMLmind XML Editor Support List > xmleditor-support at xmlmind.com > http://www.xmlmind.com/mailman/listinfo/xmleditor-support > >

