OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: AW: [docbook] external entities in docbook


Agreed.  However, in our case, the _only_ thing we use the RELAX  
schema for is for XMLMind, so to add a new element we:

- Modify the RELAX schema to support the new element
- Modify the XMLMind CSS to render the element in an appropriate way
(both of these are inside XMLMind's configuration files)
- Update the XSLT templates and scripts to support the new element.

People then update to the most recent version of the XMLMind config  
to pick up the new elements.

Therefore changing the schema isn't any more work than adding extra  
elements to the GUI of XMLMind, which would probably amount to pretty  
much the same level of work.  I agree that if we had copies of the  
schema floating around all over the place for various different uses,  
regularly modifying the schema would be a pain.

On another note, is <phrase> the correct tag to be using here?  What  
would you do with any text that the user placed inside the <phrase>  
element when you rendered it?  The tags that I've added   
( <productname/> etc.) don't allow text within them, so there's no  
possibility of the author using the tag incorrectly.

Is there an element, like <phrase>, that disallows text within it?   
Ideally, I guess that I'm looking for a tag like "<boilerplate  
role="productname/>".

Geraint North
Principal Engineer
Transitive


On 19 Nov 2007, at 16:01, David Cramer wrote:

> If your list of replaceable things is short and stable, then adding to
> the dtd is probably no big deal, but if you tend to add items, then  
> you
> probably don't want to change your dtd so often. Depending on the
> features of the editor and other details of your situation, you could
> write a macro that inserts the desired markup so the writer doesn't  
> have
> to do so much clicking. In XMetaL, you can add random things to the  
> list
> of elements and have a macro execute when that item is selected. So I
> have items like "database table" in mine that causes the editor to
> insert <database class="table">. If your editor doesn't do that, you
> could also create a  menu or submenu of items that can be inserted.
>
> As for the xslt, you could do this:
>
> <xsl:template match="phrase[@role = 'ProductName']">
> <!-- do something here -->
> </xsl:template>
>
> And add other templates for other macros. Or maybe do this:
>
> <xsl:template match="phrase[@role]">
> <xsl:choose>
> <xsl:when test="@role = 'ProductName'">
> <!-- do something here -->
> </xsl:when>
> <xsl:when test"@role = 'SomethingElse'">
> <!-- do something else here -->
> <xsl:when>
> </xsl:otherwise>
> <!-- do something...maybe fail if you didn't want to get here:
> <xsl:message terminate="yes">Uh oh!</xsl:message> -->
> </xsl:otherwise>
> </xsl:choose>
> </xsl:template>
>
> David
>
>> -----Original Message-----
>> From: Geraint North [mailto:geraint@transitive.com]
>> Sent: Monday, November 19, 2007 7:50 AM
>> To: Jirka Kosek
>> Cc: Hinrich Aue; docbook@lists.oasis-open.org
>> Subject: Re: AW: [docbook] external entities in docbook
>>
>> Yes, that would also seem to work (although I'm not sure how
>> to write an XSLT template for it).  The reason I added my own
>> tags was so that they appeared in the list of elements in the
>> GUI, so that users could easily see which ones were available.
>>
>> Thanks,
>>
>> Geraint North
>> Principal Engineer
>> Transitive
>> Maybrook House, 40 Blackfriars Street, Manchester M3 2EG, UK
>> Phone: (+44) 161-836-2315    Fax: (+44) 161-836-2399   Cell: (+44)
>> 7980-708-215
>>
>>
>> On 19 Nov 2007, at 13:29, Jirka Kosek wrote:
>>
>>> Hinrich Aue wrote:
>>>> This sounds tempting. I'm using docbook 4.
>>>> I guess I have to adapt the DTD then, so the editor
>> (Serna) doesn't
>>>> complain.
>>>
>>> I think that better is not to modify DocBook schema (DTD) for such
>>> purposes. Instead of <ProductName/> you can use
>>> <phrase>ProductName</phrase> or <phrase role="ProductName"/>, ie.
>>> leveraging existing DocBook element.
>>>
>>> --
>>> ------------------------------------------------------------------
>>>   Jirka Kosek      e-mail: jirka@kosek.cz      http://xmlguru.cz
>>> ------------------------------------------------------------------
>>>        Professional XML consulting and training services
>>>   DocBook customization, custom XSLT/XSL-FO document processing
>>> ------------------------------------------------------------------
>>>  OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 member
>>> ------------------------------------------------------------------
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: docbook-unsubscribe@lists.oasis-open.org
>> For additional commands, e-mail: docbook-help@lists.oasis-open.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: docbook-help@lists.oasis-open.org
>



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]