Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: using parent attributes to locate child attributes [Thread Next] Re: using parent attributes to locate child attributesTo: NULL Date: 10/4/2004 12:45:00 PM Let me reword this question then.
Basically I would like there to be two ways for an attributes to get into
the output document.
1. If the attribute's elements parent has an attribute with the same name
and a value of "mappable"
2. If the attribute is named "id"
As for this resulting list of id's I would like it to be a unique list.
For example:
<foo>
<xs a="mappable" b="mappable" c="mappable">
<x id="1111" a="2222" c="3333" house="home">
<x id="4444" a="5555" c="6666" house="home">
</xs>
<ys j="mappable">
<y id="7777" j="8888" house="home">
</ys>
</foo>
to
<uniques>
<unique id="1111">
<unique id="2222">
<unique id="3333">
<unique id="4444">
<unique id="5555">
<unique id="6666">
<unique id="7777">
<unique id="8888">
</uniques>
"Oleg Tkachenko [MVP]" <oleg@no_!spam!_please!tkachenko.com> wrote in
message news:OSk82dRqEHA.3700@T......
> Daniel wrote:
>
> > Is it possible w/ xsl to do this transformation:
> >
> > <foo>
> > <xs a="mappable" b="mappable" c="mappable" f="house" t="car"
> > p="notmappable">
> > <x id="11" a="1" c="2" house="home">
> > <x id="11" a="1" c="2" house="car">
> > <x id="11" a="1" c="2" house="dog">
> > </xs>
> > <ys j="mappable" k="mappable" l="foo" f="house" t="car"
p="notmappable">
> > <y id="22" j="3" l="4" house="home">
> > </ys>
> > </foo>
> >
> > to
> >
> > <uniques>
> > <unique id="11"> <!-- from id="11" cus its an id attribute -->
> > <unique id="1"> <!-- from a="1" cus its "mappable" in parent's
> > attributes -->
> > <unique id="2"> <!-- from a="2" cus its "mappable" in parent's
> > attributes -->
> > <unique id="22"> <!-- from id="22" cus its an id attribute -->
> > <unique id="3"> <!-- from a="3" cus its "mappable" in parent's
> > attributes -->
> > </uniques>
>
> I believe you need to elaboate the transformation logic further. It's
> not really clear how it should be transformed.
>
>
> --
> Oleg Tkachenko [XML MVP]
> http://blog.tkachenko.com
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
