Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: using parent attributes to locate child attributes

From: "Daniel" <softwareengineer98037@-----.--->
To: 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




transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent