Thanks for reporting this. I've logged it as a bug at
 
https://sourceforge.net/tracker/index.php?func=detail&aid=1927277&group_id=29872&atid=397617
 
and fixed it in the Subversion repository. It was already fixed in the development branch.
 
Michael Kay
http://www.saxonica.com/


From: saxon-help-bounces@lists.sourceforge.net [mailto:saxon-help-bounces@lists.sourceforge.net] On Behalf Of rosicky1507@sina.com
Sent: 27 March 2008 15:05
To: saxon-help@lists.sourceforge.net
Subject: [saxon] The Problem of creating XQSequence with methodcreateSequence()

Dear friend

I am a freshman working on xquery with saxon 9.0.01, I want to create an instance of XQSequence as follow, I get an file as output,I find out the number 1was included in the xml file successfully,but the content of document and the number 2 is not included ,how could I correct the code,thanks!

----------------------------------------------------------------------

   org.w3c.Document w3cdoc=.....; 
  ArrayList items=new ArrayList();
  items.add(new Integer(1));
  items.add(w3cdoc);
  items.add(new Integer(2));
  XQSequence result=new SaxonXQDataSource().getConnection().createSequence(items.iterator);
  
  if(result!=null)
  {
this.filename=fname;
Properties pro=new Properties();
pro.setProperty("method", "xml");
pro.setProperty("indent", "yes");
try{
   BufferedOutputStream fos=new BufferedOutputStream(new FileOutputStream(fname));
   result.writeSequence(fos, pro);
   fos.flush();
   fos.close();
}
catch(Exception e){e.printStackTrace();}
  } 
------------------------------------------------------------------------------------------------

content of the xml file:  
<?xml version="1.0" encoding="UTF-8"?>1 

Thanks for reading !



-------------------------------------------------------------------
HP Compaq6910p商用本,驱动器锁,把控安全( http://d1.sina.com.cn/sina/limeng3/mail_zhuiyu/2008/mail_zhuiyu_20080324.html )

-------------------------------------------------------------------
注册新浪2G免费邮箱(http://mail.sina.com.cn/