Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Joining XML files?

From: "rhino" <No.offline.contact.please@---------.--->
To: NULL
Date: 7/1/2008 6:10:00 PM


"Joseph J. Kesselman" <keshlam-nospam@c...> wrote in message 
news:486a9058$1@kcnews01...
> rhino wrote:
>> Given that these are two separate XML files but that there is some common 
>> information, specifically the department number, could I use XSLT to 
>> generate a report that shows me each department name followed by the 
>> names of the people who work in the department?
>
> XSLT can certainly reference more than one input source, using the 
> document() function; then it's just a matter of writing expressions that 
> use data from one document to look up information in the other document.
>
> There are probably examples on the XSLT FAQ website... but seriously, once 
> you know about the document() function it really isn't any harder than if 
> you were recombining data read from a single document.
>
> The only tricky part, really, is deciding how you're going to tell the 
> stylesheet which two sources to look at. Common solutions are passing one 
> of the URIs in as a parameter, or having one hardcoded into the 
> stylesheet, or having a front-end document which the stylesheet obtains 
> both the actual URIs from.... Which of those solutions is best depends on 
> the environment you're performing this operation in. Note that all of 'em 
> are extensible to more than 2 documents.
>
> As to what to call it: Conceptually it's certainly a join or merge. The 
> former term is more likely to be recognized by DB and data-structure 
> folks, the latter is more familiar to folks coming to XML and XSLT from 
> the document-markup side of the world. I wouldn't get hung up on the 
> terminology; the clearest solution is probably to do exactly what you did, 
> provide a brief example of what you're trying to accomplish.

Thank you once again, Joseph! This definitely gets me going in the right 
direction.

I was counting on something like this being possible for the project I am 
designing. The fact that it is possible, and apparently pretty routine, is 
VERY helpful in planning what I need to do next. (After I work out a couple 
of examples of joins/merges, that is!)

I really appreciate your assistance with my questions today!

--
Rhino




transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent