473,322 Members | 1,431 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

difficult xsl transform clarification

A and B can be anything, another words those elements are variable.
I need to transform:
<A> x <\A>
<A> y <\A>
<B> i <\B>
<B> j <\B>
<B> k <\B>

into:
<A>
<P> x <\P>
<P> y <\P>
</A>
<B>
<P> i <\P>
<P> j <\P>
<P> k <\P>
</B>

There seems no easy way to do that. Am I missing somethig? I tried
using variables, but they cannot be reassigned within the same
context. Anyone?

Thx
Jul 20 '05 #1
1 1036
You want to do grouping. The agreed best method is the meunchian method
which you can find here

http://www.jenitennison.com/xslt/grouping/index.html

Also if you search through the archives of this group, there is a
modification using the exslt distinct function.

Colin

"Greg" <gr*****@findlaw.com> wrote in message
news:d5**************************@posting.google.c om...
A and B can be anything, another words those elements are variable.
I need to transform:
<A> x <\A>
<A> y <\A>
<B> i <\B>
<B> j <\B>
<B> k <\B>

into:
<A>
<P> x <\P>
<P> y <\P>
</A>
<B>
<P> i <\P>
<P> j <\P>
<P> k <\P>
</B>

There seems no easy way to do that. Am I missing somethig? I tried
using variables, but they cannot be reassigned within the same
context. Anyone?

Thx

Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Greg | last post by:
I need to transform: <A> x <\A> <A> y <\A> <B> i <\B> <B> j <\B> <B> k <\B> into: <A> <P> x <\P>
1
by: Greg | last post by:
A and B can be anything, another words those elements are variable. I need to transform: <A> x <\A> <A> y <\A> <B> i <\B> <B> j <\B> <B> k <\B>
0
by: Xiaolei Li | last post by:
first off, i'm a total newbie at this stuff so excuse any wrong usage of terminology or whatever else. i have a XSL to transform a Document such that all "text" nodes will have a "SPAN" inserted...
2
by: John Lehmann | last post by:
I have an interesting problem. I am performing an XSL transform using the System.Xml.Xsl.Transform class. I have a database that contains the XSL style sheet string. And it seems to work pretty...
4
by: schneider | last post by:
Anyone know if there is a way to dynamicly create a Xslt template/s and use them as an xml transform with-out use files for the Xslt? All the methods I see use files. I want to create a Xslt...
1
by: M Ali | last post by:
Hi, I am in a situation where I don't have access to an xml, say "original.xml". But I do have the schema for it and an XSLT transformation on it that would create a new xml from "original.xml"...
1
by: Mike Hofer | last post by:
I've got two statements in my code that are both generating weird, weird, weird messages: The first one was, Dim document As System.Xml.XmlDocument Dim navigator As...
1
by: pillbug | last post by:
I'm having trouble using bind1st with mem_fun1. I can't compile the line marked below with a @@. If I use the join2 method everything is fine, but I wind up passing string vectors by value. I...
4
by: Dean Card | last post by:
Okay, so here is the situation. I have need to do some on-the-fly image creation. I have everything working great except for the last part of it, applying a perspective type transform to the...
6
by: Vijai Kalyan | last post by:
Hello, I am trying to use std::transform to take in a collection of strings, transform them and insert the result into an output container. So, I wrote something like this: std::wstring...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.