473,385 Members | 1,185 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,385 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 1173
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>
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...
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>
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...
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
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.