Turns out I am more of an XSLT genius than I thought.  It seems that if XSL 
matches more than one thing, it will magically pick the first as what you 
meant.  I want the last.  The following change does what I want:

> Index: js2doc2dbk.xsl
> ===================================================================
> --- js2doc2dbk.xsl    (revision 15841)
> +++ js2doc2dbk.xsl    (working copy)
> @@ -1,6 +1,6 @@
>  <?xml version="1.0" encoding="utf-8"?>
>  <!-- * X_LZ_COPYRIGHT_BEGIN 
> ***************************************************
> -* Copyright 2001-2009 Laszlo Systems, Inc.  All Rights Reserved.             
>  *
> +* Copyright 2001-2010 Laszlo Systems, Inc.  All Rights Reserved.             
>  *
>  * Use is subject to license terms.                                           
>  *
>  * X_LZ_COPYRIGHT_END ****************************************************** 
> -->
>  <!--
> @@ -24,8 +24,8 @@
>  <!ENTITY tagname        '(doc/t...@name="lzxname"]/text)'>
>  <!ENTITY docfilename    '(doc/t...@name="docfilename"]/text)'>
>  <!ENTITY shortdesc      '(doc/t...@name="shortdesc"]/text)'>
> -<!ENTITY lzxtype        '(doc/t...@name="lzxtype"]/text)'>
> -<!ENTITY lzxdefault     '(doc/t...@name="lzxdefault"]/text)'>
> +<!ENTITY lzxtype        '(doc/t...@name="lzxtype"][last()]/text)'>
> +<!ENTITY lzxdefault     '(doc/t...@name="lzxdefault"][last()]/text)'>
>  
>  <!ENTITY commonname     '(self::node()/@name | 
> self::node()/doc/t...@name="lzxname"]/text)[1]'>
 
On 2010-03-05, at 12:24, P T Withington wrote:

> So, I want to explicitly override the lzxtype in a component:
> 
>>    <!---
>>        Whether the tooltip shows up above or below the mouse
>>        position. Leave empty to have it heuristically positioned.
>> 
>>        @lzxtype 'above' | 'below' | 'default'
>>    -->
>>    <attribute name="tipvalign" value="default" type="string">
> 
> I was hoping the above would do it, but the doctools seem to create the 
> following intermediate output:
> 
>> <property id="lz.tooltip.__ivars__.tipvalign" name="tipvalign" 
>> access="public">
>>  <doc>
>>    <tag name="lzxname">
>>      <text>tipvalign</text>
>>    </tag>
>>    <tag name="lzxdefault">
>>      <text/>
>>    </tag>
>>    <tag name="lzxtype">
>>      <text>string</text>
>>    </tag>
>>    <text>Whether the tooltip shows up above or below the mouse
>>    position. Leave empty to have it heuristically positioned.</text>
>>    <tag name="lzxtype">
>>      <text>'above' | 'below' | ''</text>
>>    </tag>
>>  </doc>
>> </property>
> 
> and the (auto-generated) lzxtype that comes first is overriding my manual 
> one, presumably some step in the transformation from that intermediate format 
> to the final HTML needs to be adjusted, but I am lost in a maze of twisty 
> passages in the doc tools...  Any ideas?


Reply via email to