OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: [xml-dev] combining XML documents

[ Lists Home | Date Index | Thread Index ]

Hi,

> read which xml files are stored in 3 different directories and publish this
> results on web page (only the "title" tag to be shown), where one can then
> select 1 or 2 XML file/s to show different information.

Depends slightly on your XQuery processors (the spec doesn't define how
files are layed out etc.), but in XQuery it should be something like
this:
<html>
  <head><title>Foo</title></head>
  <body>{
for $doc in ( collection('/path/A'),
            collection('/path/B'),
            collection('/path/C') )
return <a href='{ base-uri($doc) }'>{ $doc//title }</a>
}</body>

If the HTML gets more complicated, I would advise to select the data
with XQuery and then transform it to (X)HTML using XSLT.

Martin





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS