Project

Profile

Help

Option Declaration

Added by Anonymous over 16 years ago

Legacy ID: #4727623 Legacy Poster: jcoder (nair)

Hi, I am generating java code from xquery using the saxon processor.Everything works well, except when i try to add the following it does not show the added doctype declaration in the result. declare namespace saxon ="http://saxon.sf.net/"; declare option saxon:output "doctype-system = blah.dtd"; when the new xml is generated i do not see a <!DOCTYPE "blah..> declaration add :-( I was wondering if anyone could help me out. Rajat


Replies (5)

Please register to reply

RE: Option Declaration - Added by Anonymous over 16 years ago

Legacy ID: #4727633 Legacy Poster: Michael Kay (mhkay)

I can't reproduce this. When I run this query: declare namespace saxon ="http://saxon.sf.net/"; declare option saxon:output "doctype-system = blah.dtd"; <a/> I get this output: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE a SYSTEM "blah.dtd"> <a/> I'm running it from the command line (using the .NET product) like this: c:...\bin\Query c:\temp\test.xq and the same result under Java. How are you running it?

RE: Option Declaration - Added by Anonymous over 16 years ago

Legacy ID: #4727692 Legacy Poster: jcoder (nair)

Hi, I m using a tool called stylus studio to run it

RE: Option Declaration - Added by Anonymous over 16 years ago

Legacy ID: #4727719 Legacy Poster: jcoder (nair)

hi, I tried running it from eclipse and i get the same result as before :-(

RE: Option Declaration - Added by Anonymous over 16 years ago

Legacy ID: #4727723 Legacy Poster: Michael Kay (mhkay)

You'll have to check with DataDirect, but I suspect that Stylus Studio is serializing the output itself rather than using the Saxon serializer.

RE: Option Declaration - Added by Anonymous over 16 years ago

Legacy ID: #4727746 Legacy Poster: Michael Kay (mhkay)

If you want the Saxon serialization options to have any effect, then you have to be using Saxon as both the query engine and the serialization engine. I think I've demonstrated to you that when you do that, it works. But of course it's perfectly possible to run a query through Saxon and then serialize the result yourself. I've no idea how Saxon is integrated into Eclipse - you'll have to ask the people who did the integration.

    (1-5/5)

    Please register to reply