Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

two xml documents read by one xsl doc

Status
Not open for further replies.

goofy78270

Technical User
Jul 24, 2007
38
0
0
US
I currently have the following information in one xml document, but the file list is getting rather large as I am looking to add more documents to the list and more attributes to each branch such as location, phone, etc.. I would like to take out all common data, and put this in one xml file and then list all documents in the second xml file, but how do I link the branch in the first xml to the files in the second xml?

Original code:
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Rows xmlns:xsi="[URL unfurl="true"]http://www.w3.org/2001/XMLSchema-instance">[/URL]
	<Row>
		<Branch>10</Branch>
		<Region>Michigan</Region>
		<State>MI</State>
		<BranchDoc>Pricing Matrix</BranchDoc>
		<BranchDocName>10 Pricing.xls</BranchDocName>
	</Row>
	<Row>
		<Branch>10</Branch>
		<Region>Michigan</Region>
		<State>MI</State>
		<BranchDoc>GFE Matrix (Branch, Wholesale, Retail)</BranchDoc>
		<BranchDocName>10 GFE.xls</BranchDocName>
	</Row>
	<Row>
		<Branch>10</Branch>
		<Region>Michigan</Region>
		<State>MI</State>
		<BranchDoc>Subdivision Matrix</BranchDoc>
		<BranchDocName>10 Subdivision.xls</BranchDocName>
	</Row>
	<Row>
		<Branch>10</Branch>
		<Region>Michigan</Region>
		<State>MI</State>
		<BranchDoc>Wholesale / Retail Lender Directory</BranchDoc>
		<BranchDocName>Area GL Directory.xls</BranchDocName>
	</Row>
	<Row>
		<Branch>10</Branch>
		<Region>Michigan</Region>
		<State>MI</State>
		<BranchDoc>Michigan Closing Data</BranchDoc>
		<BranchDocName>Michigan Closing Data.doc</BranchDocName>
	</Row>
	<Row>
		<Branch>10</Branch>
		<Region>Michigan</Region>
		<State>MI</State>
		<BranchDoc>Escrow Tax Chart</BranchDoc>
		<BranchDocName>Michigan Tax Chart.doc</BranchDocName>
	</Row>
...

First New XML:
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Branches xmlns:xsi="[URL unfurl="true"]http://www.w3.org/2001/XMLSchema-instance">[/URL]
	<Branch>
		<Branch>10</Branch>
		<Region>Michigan</Region>
		<State>MI</State>
                <Phone>123-456-7890</Phone>
                <StreetAddress>1234 Main Street</StreetAddress>
                ...More Attributes
	</Branch>
...

Second New XML:
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Files xmlns:xsi="[URL unfurl="true"]http://www.w3.org/2001/XMLSchema-instance">[/URL]
	<Doc>
		<Branch>10</Branch>
		<BranchDoc>Pricing Matrix</BranchDoc>
		<BranchDocName>10 Pricing.xls</BranchDocName>
	</Doc>
	<Doc>
		<Branch>10</Branch>
		<BranchDoc>GFE Matrix (Branch, Wholesale, Retail)</BranchDoc>
		<BranchDocName>10 GFE.xls</BranchDocName>
	</Doc>
...More Documents
 
But what do you mean by "link"? Having an xslt that merges back the documents?

Cheers,
Dian
 
By linking, I mean, My xsl currently pull in all information from the first xml into a table format, but I am unsure how to add the information from the second xml to the output.

To further explain, here is an example of the output desired:

(Branch #)(Region)(Branch Location-Multiple XML attributes)
(Branch #)(Region)(Branch Location-Multiple XML attributes)
(Branch #)(Region)(Branch Location-Multiple XML attributes)
(Branch #)(Region)(Branch Location-Multiple XML attributes) - Expanded by clicking on the row
(Branch Doc)
(Branch Doc)
(Branch Doc)
(Branch Doc)
(Branch #)(Region)(Branch Location-Multiple XML attributes)
(Branch #)(Region)(Branch Location-Multiple XML attributes)
(Branch #)(Region)(Branch Location-Multiple XML attributes)

I have the code done for the onclick event (to expand and show the list of documents associated with the branch) but my issue is how to populate the list using the second xml.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top