Re: Attribute match of parent element

Subject: Re: Attribute match of parent element
From: ht@xxxxxxxxxxxxxxx (Henry S. Thompson)
Date: 02 Nov 1998 17:27:51 +0000
Jeroen van Maanen <jeroenm@xxxxxxxxx> writes:

> We are using the obsolete XSLJ translator to generate DSSSL code.  The
> DSSSL style-sheet is used to generate RTF from XML documents. 
> Unfortunately we don't have time to change to something else, so at the
> moment we are trying to get our code to work, if necessary by patching the
> DSSSL code.
> 
> When we specify
> 
>   <rule>
>     <element type="spec">
>       <attribute name="type" value="T"/>
>       <target-element type="tab"/>
>     </element>
>     <literal>Foo</literal>
>   </rule>
> 
> Then the generated DSSSL code doesn't emit "Foo" for
> 
>   <spec type="T"><tab/></spec>
> 
> Whereas when we omit the <attribute> tag in the XSL style-sheet it does
> emit "Foo".
> 
> XSLJ generates code like
> 
>   ...
>   (element (spec attributes: (type "T") result tab)
>    (literal "Foo")
>   )
>   ...
> 
> I can't find a specification of (element) in the DSSSL documentation and I
> can't find a definition of (element) in the files that are supplied with
> XSLJ, so I don't know where to start looking for a solution.  What is the
> correct code to match a <tab>-element within a <spec>-element that has a
> "type"-attribute that has the value "T" (either in XSLJ-style or in
> DSSSL-style)?

Works for me, using your (old xsl) rule and your input.

What versions of jade and xslj are you using?

Are you remembering (see the xslj documentation) to invoke jade with
the -2 switch?

ht
-- 
  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
	    Fax: (44) 131 650-4587, e-mail: ht@xxxxxxxxxxxxxxx
		     URL: http://www.ltg.ed.ac.uk/~ht/


 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread