#651 Stylesheets don't recognize purpose of xml:base

AMBER
closed
nobody
None
5(default)
2014-05-03
2014-03-07
Lou Burnard
No

I claim that an encoding like this:
<graphic url="B751131015_X1888.jpg" xml:base="http://gallica.bnf.fr/ark:/12148/bpt6k1050733/f2.image"/>
should be treated just the same as one like this:
<graphic url="http://gallica.bnf.fr/ark:/12148/bpt6k1050733/f2.image/B751131015_X1888.jpg">

But it isn't. The former generates :

Warning: Could not find file /home/lou/Public/tei-fr/Projects/BVH/B751131015_X1888.jpg to copy.

whereas the latter generates :

[get] Getting: http://gallica.bnf.fr/ark:/12148/bpt6k1050733/f2.image/B751131015_X1888.jpg
[get] To: /tmp/build64741544/word/media/resource1.jpg
[echo] Read dimensions of image files and write info file
[images] /tmp/build64741544/word/media/resource1.jpg: Not a JPEG file: starts with 0x3c 0x3f

(which is fair enough since Gallica returns a whole bloomin web page containing the graphic from this URL rather than the graphic alone)

Discussion

  • Piotr Banski

    Piotr Banski - 2014-03-07

    A minor tidbit: you want a slash after "f2.image" in the @xml:base.

     
  • Sebastian Rahtz

    Sebastian Rahtz - 2014-03-07

    i wonder about this. does anyone implement xml:base? isn't it one of those failed good ideas, like xlink?

    Still, check out Stylesheets and try now.

    and tell the BNF to get their act together :-}

     
  • Sebastian Rahtz

    Sebastian Rahtz - 2014-03-24
    • status: open --> closed
     
  • Dominique Meeùs

    I realise that from some time ago, maybe since the “improvement” above, the treatment of XInclude is broken. I tried with an older stylesheet and the last one. With some old state numbered 11625, the stylesheets would give nice link attibutes (in the resulting XHTML) like
    src="../../photos/kiel06.jpg"
    href="../editeurs.html
    href="somefile.html"
    This becomes quite nonsensical now:
    src="inclusions/baseURL.xml../../photos/kiel06.jpg"
    href="inclusions/baseURL.xml../editeurs.html"
    href="inclusions/baseURL.xmlsomefile.html"
    Absolute URLs are preserved.
    (The XInclude processor is xmllint.
    More explanation on the test situation in the test document itself.)
    The xml:base is added by XInclude processors, and I understand that it could (sometimes) make sense in the resulting XML. But it is necessarily absurd to take this into account in a XHTML transform. The links one likely wants are relative to the target folder on the web site, not relative to the place XInclusions are stored.

     
  • Sebastian Rahtz

    Sebastian Rahtz - 2014-05-03

    hmm, I wish xmllint wouldnt write in xml:base attributes.

    I will investigate this.

     
  • Sebastian Rahtz

    Sebastian Rahtz - 2014-05-03

    I really don't know what to do about this. What is the @xml:base for, if I am not to use it to resolve URLs? but if xmllint puts in xml:base="inclusions/baseURL.xml", thats obviously silly. I can't see a clean solution.

    just confirms my suspicion that no-one ever did implement xml:base properly. and/or XInclude.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks