[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook] More than one value for an attribute.
Is the same thing possible vor serna (free version)? Regards Lwam Am 02.02.2011 16:16, schrieb firstname.lastname@example.org: > As you say, I think it is editor customization, and that depends on the > editor. > > In Arbortext Editor, you can get what amounts to a combobox, with free > form text entry in addition to a list of common choices. You do this by > defining an attribute value space to be the union of an enumeration > (list of specific items) and a text pattern that defines exactly what > you can type. For example: > > <xs:simpleType name="vendor"> > > <xs:union> > > <!-- TYPICAL VALUES TO CHOOSE FROM --> > > <xs:simpleType> > > <xs:restriction base="xs:string"> > > <xs:enumeration value="linux" /> > > <xs:enumeration value="mac" /> > > <xs:enumeration value="windows" /> > > </xs:restriction> > > </xs:simpleType> > > <!-- STRING PATTERN IF TYPED MANUALLY --> > > <xs:simpleType> > > <xs:restriction base="xs:string"> > > <xs:pattern value="(linux|mac|windows)((;(linux|mac|windows))*)?" /> > > </xs:restriction> > > </xs:simpleType> > > </xs:union> > > </xs:simpleType> > > I don't know if other editors would handle this in a similar way. > > *From:*Cramer, David W (David) [mailto:email@example.com] > *Sent:* Wednesday, February 02, 2011 4:58 AM > *To:* Bob Stayton; firstname.lastname@example.org; Kate.Wringe@sybase.com > *Subject:* RE: [docbook] More than one value for an attribute. > > As soon as I hit send, I woke up a little and realized that what you > really want is a dialog box in the editor (launched by a button or > whatever) that lets the writer click one or more checkboxes for each > value, then when they click ok, it turns the selected values into a > comma delimited list as the attribute value. For my xrefstyle case, I’d > use radio buttons instead of check boxes. The user is still free to edit > the attribute value manually. You could also customize the xslts to > check the list of values to make sure nothing unsupported was entered. > > David > > *From:*Cramer, David W (David) [mailto:email@example.com] > *Sent:* Wednesday, February 02, 2011 6:43 AM > *To:* Bob Stayton; firstname.lastname@example.org; Kate.Wringe@sybase.com > *Subject:* RE: [docbook] More than one value for an attribute. > > Hi Kate, > > As Bob says, the DocBook xsl’s profiling mechanism supports this, but I > take your question to be about the authoring side of the problem. What > you really want to know is if there’s a way to help the writer avoid > doing something like vendor=”Windows XP, Linix” (where “Linix” is > misspelled and so won’t have the desired effect). That seems to me a > matter of editor customization. In fact, this is on my list of things to > look into wrt the xrefstyle attribute. In that case, I would like to > offer the writer a list of typical choices but still leave them free to > enter arbitrary text so I don’ t have to enumerate every possibility in > the schema. I haven’t figured out what to do yet, so please let me know > if you come up with a situation. You might also ask your editor’s > support folks to see if they have suggestions. > > David > > *From:*Bob Stayton [mailto:email@example.com] > *Sent:* Tuesday, February 01, 2011 6:02 PM > *To:* firstname.lastname@example.org; Kate.Wringe@sybase.com > *Subject:* Re: [docbook] More than one value for an attribute. > > Yes, you can do this. See the third bullet item in this reference: > > http://www.sagehill.net/docbookxsl/MultiProfile.html > > Bob Stayton > Sagehill Enterprises > email@example.com <mailto:firstname.lastname@example.org> > > ----- Original Message ----- > > *From:*Kate.Wringe@sybase.com <mailto:Kate.Wringe@sybase.com> > > *To:*email@example.com <mailto:firstname.lastname@example.org> > > *Sent:*Tuesday, February 01, 2011 3:43 PM > > *Subject:*[docbook] More than one value for an attribute. > > > Hello, > > Is there a way to define an attribute so that the writer can select > more than one choice for its value (i.e., can an attribute be set to > a delimited list of values)? > > For example: vendor= "Windows XP, Windows 2008, Linux, Unix, Mac, iOS". > > It seems that when attributes are discussed, that there is an > assumption that the writer only wants to pick one value for the > attribute. For example, when setting > the vendor attribute, the writer only needs to choose between > Windows or Linux. However, we need to be able to specify more than > value for the vendor attribute. > For example some of our content applies to Windows only, some of the > content applies to Windows and Linux, some of the content applies to > iOs and Mac Os, some of the content > applies to Windows, Linux, and Mac Os, etc., As we support more > operating systems, the number of vendor combinations increases. We > need to be able to append the new OS to the > vendor attribute. We don't want to have a set of different > combinations to choose from as this would be cumbersome to work with. > > Any thoughts or suggestions would be greatly appreciated. > > Thank you, > Kate > > > *..........................................................................................................................................................................................................................* > > > *Kate Wringe *| Senior Information Developer | SQL Anywhere Doc Team | > Sybase | 445 Wes Graham Way, Waterloo, ON, N2L 6R2 Canada | Tel: > (519) 883-6838 | email@example.com | www.sybase.com > -- Gruß Lwam Berhane punkt.de GmbH TYPO3-Internet-Dienstleistungen-Beratung Kaiserallee 13a Tel.: 0721 9109-0 Fax: -100 76133 Karlsruhe firstname.lastname@example.org http://punkt.de/ AG Mannheim 108285 Gf: Jürgen Egeling