From: SourceForge.net <no...@so...> - 2010-01-15 19:42:30
|
Bugs item #2929679, was opened at 2010-01-11 10:31 Message generated for change (Comment added) made by mzjn You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=373747&aid=2929679&group_id=21935 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: XSL Group: output: HTML Status: Open Resolution: None Priority: 5 Private: No Submitted By: anatoly techtonik (techtonik) Assigned to: Nobody/Anonymous (nobody) Summary: consistent generate id Initial Comment: When generate.id.attributes is set elements get random ids every build. This creates mess in file history in version control systems. Possible workaround by David N. Welton at http://journal.dedasys.com/2009/09/07/stopping-docbook-version-control-churn ---------------------------------------------------------------------- >Comment By: Mauritz Jeanson (mzjn) Date: 2010-01-15 20:42 Message: OK, point taken. Let us think about this some more. Your original description was basically just a reference to a blog post. It would have been helpful if you had provided more details about your own requirements, and why you (apparently) reject the suggestions mentioned in the comments to that blog post. ---------------------------------------------------------------------- Comment By: anatoly techtonik (techtonik) Date: 2010-01-15 19:20 Message: It is only logical when generated content changes if document structure changes. The opposite is not. As for keeping generated content in VCS - would a reason of automatically updating web site from VCS repository be good enough for this change? Will the template below produce better default ids? <xsl:template name="object.id"> <xsl:param name="object" select="."/> <xsl:choose> <xsl:when test="$object/@id"> <xsl:value-of select="$object/@id"/> </xsl:when> <xsl:when test="$object/@xml:id"> <xsl:value-of select="$object/@xml:id"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="local-name($object)"/><xsl:number level="multiple"/> </xsl:otherwise> </xsl:choose> </xsl:template> ---------------------------------------------------------------------- Comment By: Mauritz Jeanson (mzjn) Date: 2010-01-15 18:47 Message: You may have good reasons for storing generated files in a VCS, but it is not really DocBook-XSL's fault that the IDs are changing. If you want to use xsl:number instead of generate-id, then it is very easy to customize the "object.id" template in common.xsl, as suggested in the blog post that you referred to. But this is not guaranteed to always work; the number produced by xsl:number can change if the document structure changes. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=373747&aid=2929679&group_id=21935 |