xsl-list
[Top] [All Lists]

Re: Tricky inclusion match

2005-03-30 14:05:57
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[(_at_)fieldname='color'][not(.=preceding-sibling::field[(_at_)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(_at_)mulberrytech(_dot_)com
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
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>