[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Lookup without document('') function
Hi David,
Well, assuming you can't switch processors as outlined by Kip in that very on-topic post.... At 01:19 AM 11/8/2003, you wrote: Technically I can probably put the lookup table in the input source since I'm getting it back from a Database Query. One other question, is there any way to use XPath to eliminate duplicates from a Node Set. Yes, but we need to understand what you mean by "duplicate". Since my XML I'm dealing with looks something like: Yes, de-duplicating is possible; you most commonly see it as a step along the way to grouping. The most popular and friendly way, assuming you're familiar with keys, is to declare a key that lets you retrieve nodes by their value, and then when you process a node, test whether it's the first (or last) of the nodes retrieved by the key with the current value. This can be done either with the generate-id() function or by using a counting-the-union approach for testing node identity. That's the explanation in prose; more useful to you would be to see the code, which you can find in any resource like the XSL FAQ, www.jennitennison.com, or any on- or off-line resource that describes grouping in XSLT 1.0. Cheers, Wendell I'll keep looking for an interface to a processor that supports the document() function as that is the easiest way I can see in getting this to work (the site this will be implemented on is using XALAN so I don't have to worry about it when its in production). ====================================================================== 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
|