Guest_imported
New member
- Jan 1, 1970
- 0
Help,
I have a xml file:
<persons>
<preson no="1">
<name>John</name>
<set>1</set>
<say>hello</say>
</preson>
<preson no="2">
<name>John</name>
<set>1</set>
<say>hey</say>
</preson>
<preson no="3">
<name>Peter</name>
<set>2</set>
<say>hi</say>
</preson>
<preson no="4">
<name>Peter</name>
<set>3</set>
<say>yo</say>
</preson>
</persons>
etc...
John from <person no="1"> and <preson no="2"> this is the same person from
database. Also <set> from <person no="1"> and <set> from <person no="2">
this is the same <set>. Each person has a few sets, and each set cointains a
few elements <say>.
I don't know how to write an XSL which makes from this exapmle XML next one:
<presons>
<preson>
<name>John</name>
<sets>
<set>1</set>
<says>
<say>hello</say>
<say>hey</say>
</says>
</sets>
</person>
<preson>
<name>Peter</name>
<sets>
<set>2</set>
<says>
<say>hi</say>
</says>
<set>3</set>
<says>
<say>yo</say>
</says>
</sets>
</person>
etc...
--
Artur
I have a xml file:
<persons>
<preson no="1">
<name>John</name>
<set>1</set>
<say>hello</say>
</preson>
<preson no="2">
<name>John</name>
<set>1</set>
<say>hey</say>
</preson>
<preson no="3">
<name>Peter</name>
<set>2</set>
<say>hi</say>
</preson>
<preson no="4">
<name>Peter</name>
<set>3</set>
<say>yo</say>
</preson>
</persons>
etc...
John from <person no="1"> and <preson no="2"> this is the same person from
database. Also <set> from <person no="1"> and <set> from <person no="2">
this is the same <set>. Each person has a few sets, and each set cointains a
few elements <say>.
I don't know how to write an XSL which makes from this exapmle XML next one:
<presons>
<preson>
<name>John</name>
<sets>
<set>1</set>
<says>
<say>hello</say>
<say>hey</say>
</says>
</sets>
</person>
<preson>
<name>Peter</name>
<sets>
<set>2</set>
<says>
<say>hi</say>
</says>
<set>3</set>
<says>
<say>yo</say>
</says>
</sets>
</person>
etc...
--
Artur