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

Re: Tricky inclusion match

Subject: Re: Tricky inclusion match
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Wed, 30 Mar 2005 16:05:57 -0500
Re:  Tricky inclusion match
Karl,

At 03:37 PM 3/30/2005, you wrote:
I was able to put most of your stuff to work in my "real" scenario but
got a little stuck because my data looks like this (hierarchely)

recordset
  record
    field

where field is "color" and recordset is "picture".
So I am one deeper than the example I gave.  Plus, to confuse things a
little, my field name are field with attribute value name to describe
the element.  So the revised xml would look like (just a snippet of
it):

    <recordset rsName="pictures">
        <record sample="1">
                <field fieldname="color">red</color>
                <field fieldname="color">brown</color>
                <field fieldname="color">red</color>
        </record>
    </recordset>

Yes, in this case the XPath would be more complicated ... sth like


field[@fieldname='color'][not(.=preceding-sibling::field[@fieldname='color'])][.=$colors]

etc.

When things get really gnarly, variables are a big help.

I hope that nobody gets upset because I inquired with a simplified
example of my data, It was easier than trying to describe the real
data I had.

Not at all: actually, I think that's generally a good idea. As long as you don't simplify the problem away! since it's *not* cool to say "thanks for the help, but that wasn't the real problem". But if you represent the problem properly, not only is no harm done, it's easier for everyone.


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

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.