xml editor

Supported platforms

Compatible with Windows7 & Mac OS X Snow Leopard

Ready for data server software
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] merging two documents - only if second document matches


Subject: RE: [xsl] merging two documents - only if second document matches
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Fri, 2 Feb 2001 09:25:47 -0000

> I have two documents, file A and file B.  I want to join them 
> on the id of
> the first, but only if a matching id is in the 2nd.  How do I do this?
> 
> File A              File B               Desired Output
> <id> A </id>        <id> A </id>         <id> A </id>
> <id> B </id>        <id> C </id>         <id> D </id>
> <id> D </id>        <id> D </id>
> 

<xsl:copy-of select="document('a.xml')//id[.=document('b.xml')//id]"/>

Mike Kay

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



Current Thread
XML Editor | XML Author | WYSIWYG Editors | Schema Editor | XSD Documentation | XSL/XSLT Editor | XQuery | XML Databases | SVN Client
© 2002-2011 SyncRO Soft Ltd. All rights reserved. | Sitemap | Privacy Policy | This website was created & generated with <oXygen/>®XML Editor