[basex-talk] Class 'BaseXHTTP' missing?

2019-02-27 Thread Jan Stapel
Hello,

i just tried to run the Java REST-Examples found on GIT/the basex-doc. 
BaseXHTTP cannot be resolved to a type.

I am using the current version. Am I missing something?

best,

Jan



Re: [basex-talk] Activating gzip compression

2019-02-27 Thread Michael Seiferle
Hi Omar, 

I can not get it to work either, yet: 
>> * No content-encoding is specified by the resource
>> 
>> I found no way to not specify an encoding for whatever I return in RESTXQ. 
>> If I don't specify anything it's UTF-8. it shows up as "; 
>> character-set=UTF-8"I did not find a way to specify no encoding. Maybe 
>> unrelated but perhaps that is a problem.
>> 
>> 

Content-Encoding denotes how the content has been encoded (gzip, deflate, etc.) 
=> https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding 
 
that’s not the character encoding (such as UTF8).
So the GZIP handler not working correctly is most probably not due to the UTF8 
Encoding you are seeing.


Actually I did not get the GzipHandler working, even using the DefaultServlet ( 
=> requests to /static) instead of BaseX’ RestXQServlet and I found this 
comment that states:
> https://stackoverflow.com/questions/38635262/jetty-9-and-gziphandler 
> The 
> implementation of Gzip support in Jetty is now based on a Container HTTP 
> Output Interceptor pattern. This means GzipHandler has to be defined at a 
> point in the Jetty Handler tree before your WebApp and its WebAppContext even 
> exists.
> 
> 

I’m by no means an expert on servlets, so my conclusions might be wrong! 

Best
Michael



> Am 26.02.2019 um 18:27 schrieb Omar Siam :
> 
> Hi,
> 
> I tried both ways of enabling gzip compression for JSON and js (and others). 
> I can't see it actually working. The GzipFilter method from the web.xml 
> sample seems to be deprecated with a warning of "it is bug ridden" ... But 
> then in a browser debugger I cannot see it actually zipping anything.
> 
> I trief to enable this in my BaseX 9.1.2 instance using
> 
>   
> GzipFilter
> org.eclipse.jetty.servlets.GzipFilter
> 
>   mimeTypes
>   
> text/html,text/xml,text/ecmascript,application/xhtml+xml,application/json,application/javascript,image/svg+xml
> 
>   
>   
> GzipFilter
> /*
>   
> The GzipHandler method seems to get loaded but then also in a browser 
> debugger I cannot see it actually zipping anything.
> 
> For the GzipHandler the documentation 
> https://www.eclipse.org/jetty/documentation/current/gzip-filter.html 
>  talks 
> about when it actually gets invoked and mentions:
> 
> * No content-encoding is specified by the resource
> 
> I found no way to not specify an encoding for whatever I return in RESTXQ. If 
> I don't specify anything it's UTF-8. it shows up as "; character-set=UTF-8"I 
> did not find a way to specify no encoding. Maybe unrelated but perhaps that 
> is a problem.
> 
> I modified webapp/WEB-INF/jetty.xml like this so it uses the GzipHandler 
> (copied from the current jetty distribution):
> 
> 
>   
>   
> ...
>   
>   
> 
>class="org.eclipse.jetty.server.handler.gzip.GzipHandler">
>  deprecated="gzip.minGzipSize" default="2048"/>
>  deprecated="gzip.checkGzExists" default="false"/>
>  name="jetty.gzip.compressionLevel" deprecated="gzip.compressionLevel" 
> default="-1"/>
>  name="jetty.gzip.inflateBufferSize" default="0"/>
>  name="jetty.gzip.deflaterPoolCapacity" default="-1"/>
>  default="false" />
> 
> 
>   
>  deprecated="gzip.excludedUserAgent" default=".*MSIE.6\.0.*"/>
>   
> 
> 
>  name="jetty.gzip.includedMethodList" default="GET" />
>  name="jetty.gzip.excludedMethodList" default="" />
> 
>   
> 
>   
> 
> I hope there is a way to get this to work.
> 
> Best regards
> 
> Omar Siam
> 
> 
> 



Re: [basex-talk] following-sibling axis

2019-02-27 Thread Michael Seiferle
Hi Mark, 

as Martin already stated, the '-w‘-Option has to be active at import time, 
otherwise the whitespace will be chopped. 

If I were to do it, I’d reindex all data and explicitly mark all elements that 
should preserve whitespace, if this is not an option I’d reindex all data with 
whitespace chopping set to off.

Looking forward to your example, I am sure we can figure this out :-)

Best
Michael




> Am 26.02.2019 um 18:52 schrieb Mark Bordelon :
> 
> A follow-up:  starting basex -w does NOT seem to solve completely my issue 
> after all. Real data (more complicated than the simplified example) still 
> does not query correctly: text nodes from after later elements are displayed 
> in the place of null text nodes.
> I’ll try to get a better example, still simplified, that shows this.



Re: [basex-talk] supporting XML Catalog files in xslt:transform() (patch)

2019-02-27 Thread Michael Seiferle
Dear Liam, 

Thanks a lot for this Patch, this issue has been open for quite some time ;-)
As Christian is currently on holidays and will only return next week, I added a 
Pull Request on GitHub https://github.com/BaseXdb/basex/pull/1667 
 so the patch won’t be lost.


Feel free to resubmit that PR if you’d like to have the correct author info in 
the git history, currently it is misattributed to me!


Thanks again!

Best from Konstanz

Michael