This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
attributes in xquery element constructor
- From: Marco Vezzoli <marco dot vezzoli at st dot com>
- To: kawa <kawa at sourceware dot cygnus dot com>
- Date: Thu, 24 Jan 2002 17:13:48 +0100
- Subject: attributes in xquery element constructor
When I try to do expression like this
...<element attribute={ $i}>...
kawa-xquery repl fails quietly and do not resume.
Here the shortest test i found editing a test case from W3C
<bib>
{
for $b in document("bib.xml")/bib/book
return
<book year={ $b/@year }>
{ $b/title }
</book>
}
</bib>
where the bib.xml file is
<bib>
<book year="1994">
<title>TCP/IP Illustrated</title>
<author><last>Stevens</last><first>W.</first></author>
<publisher>Addison-Wesley</publisher>
<price> 65.95</price>
</book>
<book year="1992">
<title>Advanced Programming in the Unix
environment</title>
<author><last>Stevens</last><first>W.</first></author>
<publisher>Addison-Wesley</publisher>
<price>65.95</price>
</book>
<book year="2000">
<title>Data on the Web</title>
<author><last>Abiteboul</last><first>Serge</first></author>
<author><last>Buneman</last><first>Peter</first></author>
<author><last>Suciu</last><first>Dan</first></author>
<publisher>Morgan Kaufmann Publishers</publisher>
<price> 39.95</price>
</book>
<book year="1999">
<title>The Economics of Technology and Content for
Digital TV</title>
<editor>
<last>Gerbarg</last><first>Darcy</first>
<affiliation>CITI</affiliation>
</editor>
<publisher>Kluwer Academic Publishers</publisher>
<price>129.95</price>
</book>
</bib>
--
(--cafe babe--)
Marco Vezzoli marco.vezzoli@st.com
CR&D Intranet Developement STMicroelectronics
tel. +39 039 603 6852 fax. +39 039 603 5055