This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [docbook-apps] add 'id' afterwards automatically


At 16:53 14/10/2003 +0500, David Tolpin wrote:
> Is there an easy way to process existing DocBook XML files and add to all
> elements an "id" attribute which do not already have one?
>

I would do it in Java in two passes.


... or an identity pass,

<xsl:template name="addId">
<xsl:when test="@id">
   copy through
<xsl:otherwise>
   attribute name='id'
     generate-id()
   /attribute
</xsl:otherwise>

then call this from all node()'s?

HTH DaveP



To unsubscribe from this list, send a post to docbook-apps-unsubscribe@lists.oasis-open.org, or visit http://www.oasis-open.org/mlmanage/.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]