![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Getting distinct values [Thread Next] Re: Getting distinct valuesTo: NULL Date: 3/30/2008 8:33:00 PM U¿ytkownik "chris fellows" <chrisfellows@n...> napisa³ w wiadomo¶ci news:eShewdZkIHA.1168@T...... >I need some help to transform some XML that is derived from a recordset >where each record is a Record element. My output XML needs to have one >Record element for each distinct Id value and within this element I want a >ColValuesA element that contains a distinct list of all ColA values and a >ColValuesB element that contains a distinct list of all ColB values. In XSLT you can use "attributes rule" - I mean in one element you can have only one attribute with certain name, so first transform your column data to elements' attributtes names and then you will be able count or read that attributtes. For example: if you have values: B1, B2, B3, B1, B2, B3 and that values transform to node's attributtes names you would have: <node B1="" B2="" B3=""/> because it is not possible to have a few attributtes with the same name (<node B1="" B2="" B3="" B1="" B2="" B3=""). It is one way to get distinct values in xml via xslt transformation -- td | ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
