[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Xref numbering test
Norma,
At 07:14 AM 12/16/2003, you wrote: Thanks for reply but maybe I didn't make want I want clear. The xref has a xidtype of step but my elements are step1 step2 step3. I need to know whether the step is a step1 or step2 etc. in order to number it correctly. If you have distinct templates for each type of step: <xsl:template match="step1" mode="xref"> Numbering for step1...</xsl:template> <xsl:template match="step2" mode="xref"> other numbering for step2...</xsl:template> all you need to do is select the target node of your xref (using id() or key(), the same way you would do if there were only one type of target) and apply templates to it in this mode. The templates will sort out which one is which, without having to test explicitly (the template matching does the testing) -- all you need is the correspondence between @xrefid in the xref and @id (or whatever) on the target node. I'm sorry this was not made clearer in my post. Also, xsl:number provides support directly for hierarchical numbering a la "1.4.2": you might want to look into this further if you aren't aware of it already (why reimplement it?). Cheers, Wendell <xref xrefid="step1-10" xidtype="step"></xref> ====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ====================================================================== XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|