This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

XML and XSLT


I would like to use XSTL to transform one XML doc (call it "A") into a new
XML doc (call it "B"):


Here is "A":

<?xml version="1.0"?>
<dsobjects>
	<prop>
		<title>President's Office Staff</title>
		<summary>Financial Reports for President's Office
Staff</summary>
	</prop>
	<prop>
		<title>VP of Finance</title>
		<summary>Financial Reports for VP of Finance</summary>
	</prop>
		<title>VP of External Affairs</title>
		<summary>Financial Reports for VP of External
Affairs</summary>
	</prop>
	<prop>
		<title>VP of Internal Affairs</title>
		<summary>Financial Reports for VP of Internal
Affairs</summary>
	</prop>
...etc...........
<dsobjects>



And here is "B":

<?xml version="1.0"?>
<dsobjects>
	<dsobject type="Collection" handle="Collection-100">
		<prop>
			<title>President's Office Staff</title>
			<summary>Financial Reports for President's Office
Staff</summary>
		</prop>
	</dsobject>
	<dsobject type="Collection" handle="Collection-101">
		<prop>
			<title>VP of Finance</title>
			<summary>Financial Reports for VP of
Finance</summary>
		</prop>
	</dsobject>
	<dsobject type="Collection" handle="Collection-102">
		<prop>
			<title>VP of External Affairs</title>
			<summary>Financial Reports for VP of External
Affairs</summary>
		</prop>
	</dsobject>
	<dsobject type="Collection" handle="Collection-103">
		<prop>
			<title>VP of Internal Affairs</title>
			<summary>Financial Reports for VP of Internal
Affairs</summary>
		</prop>
	</dsobject>

......etc......

</dsobjects>




As you can see, the "B" sample adds a counting element to identify each
individual "dsobject type".  There will be several hundred of these to tag
with a sequential number.


Can anyone help suggest the syntax of the XSL doc to apply against XML Doc
"A" to produce XML doc "B"?

Any help would be MUCH appreciated...


-Matt


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]