Broken Plot Splitting ======================== In rare cases the plot split algoritm makes a bad split which has no content in the 2nd plot, causing an errort text message SVG rather than a plot. broken plot, [INVALID actually broken splitting] ---------------------------------------------------- * http://130.87.106.59:8080/b2charm/end_of_2011/00201.html * http://130.87.106.59:8080/b2charm/end_of_2011/03221.svg * formerly such an issue was caused by excessive range, but seems not the case here * http://130.87.106.59:8080/b2charm/end_of_2011/00109.html No qtys in range ? * use HFAG_SCRAPE_FOLDER/log.xml to determine the dynamic call :: b2mc:~ heprez$ grep 03221 $HFAG_SCRAPE_FOLDER/log.xml * http://130.87.106.59:9090/hfagc/03221/plot/svg?sqz=0.3&vmi=0.7033333333333333&vmx=100000.0&uni=1.0&opt=plot,head,sabel,onlycom,nex,npo,dvi&apt=save&bpt=save * this reproduces the text plot error message * http://130.87.106.59:9090/hfagc/03211/plot/svg?sqz=0.3&vmi=-100.0&vmx=0.7033333333333333&uni=1.0&opt=plot,head,sabel,onlycom,nex,npo,dvi&apt=save&bpt=save * sibling plot is OK, seems the problem is an unneeded range split resulting in no qtys in the bad split range ? * http://130.87.106.59:9090/hfagc/03211/plot/svg?sqz=0.7&vmi=-100.0&vmx=0.7033333333333333&uni=1.0&opt=plot,head,sabel,onlycom,nex,npo,dvi&apt=save&bpt=save * increasing *sqz* makes it easier to see the layout, spreading in y * http://130.87.106.59:9090/hfagc/03211/plot/svg?sqz=0.7&vmi=-100.0&vmx=0.7033333333333333&uni=1.0&opt=plot,head,sabel,onlycom,nex,npo,dvi,dbg&apt=save&bpt=save * add **dbg** to *opt* gives detailed info in the metadata element, use Safari inspect element on the SVG to inspect this broken range splitting (suspect algorithm edge case) ----------------------------------------------------- A workaround of making the aflicted area invisible seems appropriate::
* http://130.87.106.59:9090/hfagc/00201/html?apt=save&bpt=save Lots of broken image links, but the bad split is apparent. Trace, thru :heprez:`source:trunk/hfag/mods/webapp/hfagc/sitemap.xmap.template` at top level an aggregate of many other things off the cocoon pipeline:: 1038 1039 1040 1041 1042 1043 1044 1045 1046 Like:: 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 Note that the cache path is passed into the query from the sitemap as **sm-path** * http://130.87.106.59:9090/xmldb/db/cache/hfagc/20130705/00201/ Grab just the *comb* returns docbook xml with the issue apparent:: b2mc:20130704 heprez$ curl -s "http://130.87.106.59:9090/hfagc/00201/comb/html?apt=save&bpt=save" | xmllint --format -
Neutral B,new particles
...
present-plot:present-plot ERROR the image map is not available : /db/cache/hfagc/20130704/00201/03221/plot.svg
The *table* chapter, dumping some erros regarding unknown exist namespace prefix:: b2mc:~ heprez$ curl -s "http://130.87.106.59:9090/hfagc/00201/table/html?apt=save&bpt=save" | xmllint --format - 2> /dev/null Compilation Latex Table /db/cache/hfagc/20130705/00201/00201/table.tml
.... From :heprez:`source:trunk/hfag/mods/webapp/hfagc/modes-comb.xq` find that range debug info given by `opt=rbg` * http://130.87.106.59:9090/hfagc/00201/html?apt=save&bpt=save&opt=rbg :: vi ./hfag/mods/webapp/hfagc/xquery/rezx.xqm ./hfag/mods/webapp/hfagc/modes-comb.xq :: -0.984 3.332 4.316 -0.265 1.000 2.612 -3.000 2.877 -1.000 0.410 1.000 0.410 1.000 0.700 0.700 -1.000 0.703 0.163 BR:-511:-311,81*/BR:-521:-321,81 BR:-511:-311,83*/BR:-521:-321,83 -0.080 -0.265 -0.080 -0.265 0.068 0.068 0.900 2.612 0.900 2.612 1.525 1.525 0.410 1.000 0.410 1.000 0.700 0.700 1.000 -3.000 -0.265 2.612 2.877 0.719 -0.092 0.695 -0.984 3.332 -0.984 3.332 regi:1 -100.0 0.7033333333333333 2 0.7033333333333333 100000.0 nreg:2 ulh urh urh - ulh [ lhv ] [ rhv ] [ rhv - lhv ] [ chvi ] cavg xspl rnge: -0.9842517174991172 3.3317922030914753 4.316043920590593 -0.26491106406735176 1.0 2.61245154965971 -3.0 2.877362613727062 -1.0 0.41 1.0 0.41 1.0 0.7 0.7 -1.0 0.7033333333333333 0.1629578721333057 unit: 1.0 nlins: 8 3 2 3 0.70333333/4.316043920590593 :: In [6]: 0.70333333/4.316043920590593 cavg/(urh - ulh) is less than $rezx:plot-split 0.2 causing the split .... how did the range get so wide, maybe an old value non-active value is sneaking in Out[6]: 0.16295787136099352 [FIXED] cannot view cache html thru xmldb interface ------------------------------------------------------ .. sidebar:: Fixed by :heprez:`r942` BUT there might be side effects Get `Resource not found` errors for cached docbook. This is due to poor naming of this docbook as `.html` that trips up the pipeline. Maybe change the `.html` OR pipeline handling of `.html` within xmldb. * http://130.87.106.59:9090/xmldb/db/cache/hfagc/20130711/00201/ * http://130.87.106.59:9090/xmldb/db/cache/hfagc/20130711/00201/comb.html Identifying the issue ------------------------ http://130.87.106.59:9090/xmldb/db/cache/hfagc/20130711/00201/ :: doc("comb.html")//metadata[@narea=0] the immediate table:: doc("comb.html")//table[tr/td/metadata/@narea=0]
present-plot:present-plot ERROR the image map is not available : /db/cache/hfagc/20130711/00201/03221/plot.svg pluck the containing div that holds the empty region:: doc("comb.html")//div[table/tr/td/table/tr/td/metadata/@narea=0] * http://130.87.106.59:9090/xmldb/db/cache/hfagc/20130711/00201/comb.html combined presentation cache, incorporates the below * http://130.87.106.59:9090/xmldb/db/cache/hfagc/20130711/00201/03221/plot.html plot presentation cache for single region manual edit to render the errant div invisible ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ For checking better to use:: style="background-color:grey;" :: b2mc:20130711 heprez$ vi ./hfagc/00201/00201.html 510
511 512 513 514 515
(0.703<values)
516 517 518
519 520 521 522 523
SVGPDFPNG
make that edit in stylesheet ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Try to apply this edit via `hfag/mods/webapp/hfagc/stylesheets/db2html-scb.xsl`:: 030 background-color:grey; 624 625 626
627 628 629
630
Testing with http://130.87.106.59:9090/hfagc/00201/html?apt=save&bpt=save it failed to apply. Doing the transform stanfalone works howevee:: b2mc:logs heprez$ mkdir /tmp/k b2mc:logs heprez$ curl http://localhost:9090/servlet/db/cache/hfagc/20130711/00201/comb.html -o /tmp/k/comb.xml b2mc:logs heprez$ find $EXIST_HOME -name db2html-scb.xsl /Users/heprez/data/install/exist/eXist-snapshot-20051026/unpack/4/webapp/hfagc/stylesheets/db2html-scb.xsl b2mc:logs heprez$ xsltproc $xsl /tmp/k/comb.xml > /Users/heprez/data/data/scrape/20130711/hfagc/00201/00201.html Aha, was not applying as the metadata was stripped in the step before, retaining metadata with **met=yes** succeeds to apply * http://130.87.106.59:9090/hfagc/00201/html?apt=save&bpt=save&met=yes works after moving error style to strip-metadata.xsl ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Leaving as red for now, for a full scrape check.