ASP Error: 70
Description: Permission denied
Source: Microsoft VBScript runtime error

[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: find unique codes

Subject: Re: find unique codes
From: Joerg Pietschmann <joerg.pietschmann@xxxxxx>
Date: Wed, 22 Aug 2001 12:32:54 +0200
unique code names
Xiaocun Xu <xiaocunxu@xxxxxxxxx> wrote:
>   I am still struggling with this problem.  I was
> thinking, is there a way to use declare one xsl:key
> across two different types of elements,
> ExtendedAttributeDefinition/@ExtendedAttributeDefinitionCode
> and ExtendedAttribute/@ExtendedAttributeCode?

Try something like (long names abbreviated...)

  <xsl:for-each select="ExAtDe[not((preceding::ExAtDe/@ExAtDeCo
                                   |preceding::ExAt/@ExAtCode)
                               =@ExAtDeCo)]
                        |ExAt[not((preceding::ExAtDe/@ExAtDeCo
                                 |preceding::ExAt/@ExAtCo)
                               =@ExAtCo)]">
   ...

This may not be something you want because whether an eliminated
element is an ExAtDe or an ExAt is controlled by their position in
the document, if you want consistently weed out ExAt elements this
would be slightly more complex.

A key might improve performance, or it might degrade it (Muenchean
Grouping by the codes):
  
  <xsl:key name="code" match="ExAt|ExAtDe" use="@ExAt|@ExAtDe"/>

  <xsl:for-each select="ExAt[count(.|key('code',@ExAtCo))=1]
                        |ExAtDe[count(.|key('code',@ExAtDeCo))=1]">
  ...

Completely untestet. HTH anyway.

J.Pietschmann

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.