Subject: Re: [xsl] keys and idrefs From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Fri, 05 Oct 2001 11:31:02 -0400 |
With XML such as <process id="schemaDesign" layer="datalayer" control="XAG systemArchitecture" input="systemSpec "> <name>Schema Design</name> </process>
and lots of similar,
then lots of <document elements>
<document id="XAG" layer="WAI" > <name>XML Guidelines</name> </document>
I.e. the idrefs (control attribute on <process>) point to the controlling documents.
I'm trying to present the list of processes controlled by the document in an html para.
in the template for 'document' I'm using the hack
<xsl:template match="document"> <xsl:variable name="thisDoc" select="@id"/> ..... <p> Controls: <xsl:for-each select="id(//process|//document[@control='$thisDoc'])"> <a href="{@id}.html"> <xsl:value-of select="name"/> </a>  </xsl:for-each> </p>
So you'd have <xsl:for-each select="key('processes-by-control', @id)"> ...
Cheers, Wendell
====================================================================== 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 ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] keys and idrefs, DPawson | Thread | RE: [xsl] keys and idrefs, DPawson |
[xsl] Creating Multiple Files from , Betty Harvey | Date | Re: [xsl] Creating Multiple Files f, Jörg Heinicke |
Month |