From: Tim W. <tw...@re...> - 2003-06-08 17:42:44
|
On Sun, Jun 08, 2003 at 10:26:05AM -0500, Alex Roitman wrote: > Just wanted to note that changing the ID in the following line from I25= =20 > to I37 shows more generations and nice images/frames (apparently, I25 in= =20 > the example database does not have a lot of ancestors :-) > - <xsl:variable name=3D"ancestors-of" select=3D"'I25'"/> > + <xsl:variable name=3D"ancestors-of" select=3D"'I37'"/> Ah, I've been using my own database, and I happen to be I25 in that. :-) I'll set it to I37 for now. I've also fixed several bugs since I sent it: o Create valid XHTML o Qualify names when they are not birth names [like '(Married name)'] o Don't include partner photo unless listing children o Use nickname in 'More about:' o Better picture placement o For several relationships, use 'later married' when appropriate o Get images in the right order I've put the current stylesheet I have at http://cyberelk.net/tim/gramps/xsl, so you can use this small stylesheet fragment to easily change the target person and it will pick up fixes I make: <?xml version=3D'1.0'?> <xsl:stylesheet xmlns:xsl=3D"http://www.w3.org/1999/XSL/Transform" version=3D'1.0'> =20 <xsl:import href=3D"http://cyberelk.net/tim/gramps/xsl/ancestors.xsl"/> <xsl:param name=3D"ancestors-of" select=3D"'I37'"/> =20 </xsl:stylesheet> > I like this approach very much. A practical question: how does one go=20 > about translating <xsl:text> entries into other languages? Do we need to= =20 > have a separate version of the .xsl file for each language? Or is there= =20 > any way to translate string at xsltproc run-time? It can be translated at run-time. The way the DocBook XSL stylesheets do it is like this: <xsl:call-template name=3D"gentext"> <xsl:with-param name=3D"key" select=3D"'Copyright'"/> </xsl:call-template> and then have nodes listed in language-specific XML files which are brought together by the gentext template (in common/l10n.xsl). It isn't as easy as putting _("") round the text I'm afraid. :-( Tim. */ |