The Edit Page Header allows one to define an HTML page <head> element's child
using TH1 variables:

   <base href="$baseurl/$current_page" />

THE QUESTION:
Is there a TH1 variable that contains the a more accurate address of the page?
For example, when viewing a specific ticket, the URL might be:

http://themis:8080/tktview/149873cca9e566ab28d2b9922e44a515a639c3ff

or

   http://themis:8080/tktview?name=149873cca9

But the Base URI as defined by the above concatenation is really:

   http://themis:8080/tktview

since $current_page is valued at "tkview".

What I'd like is to have a TH1 variable that allows me to construct a value like"tkview?name=149873cca9" or "tkview/149873cca9e566ab28d2b9922e44a515a639c3ff <view-source:http://themis:8080/tktview>"

THE PROBLEM:

The problem I am experiencing concerns <svgs> elements and the mechanism
where internal markers are resolved. For example, if I have an SVG that contains a line with an arrowhead, the construction is basically a line element with an
additional marker that has to be resolved within the <svg>.

Here's an simple working example SVG:

<svg width="640" height="60" xmlns="http://www.w3.org/2000/svg"; xmlns:svg="http://www.w3.org/2000/svg";>
     <!-- Created with SVG-edit - http://svg-edit.googlecode.com/ -->
     <defs>
<marker refY="50" refX="50" markerHeight="5" markerWidth="5" viewBox="0 0 100 100" se_type="rightarrow" orient="auto" markerUnits="strokeWidth" id="se_marker_end_svg_1"> <path stroke-width="10" stroke="#ff0000" fill="#ff0000" d="m100,50l-100,40l30,-40l-30,-40z"></path>
      </marker>
     </defs>
     <g>
      <title>Layer 1</title>
<line marker-end="url(#se_marker_end_svg_1)" id="svg_1" y2="50" x2="230" y1="50" x1="100" fill-opacity="0" stroke-linecap="null" stroke-linejoin="null" stroke-dasharray="null" stroke-width="5" stroke="#ff0000" fill="none"></line>
     </g>
    </svg>

The marker-end attribute of the <line> tag contains a function "url()" which references an internal <marker> element as defined within the SVG's <defs> element. In order to properly resolve, the Base URI needs to be to the specific document. Try added the above <svg>...</svg> into a ticket in HTML mode and notice that in the "preview" mode, the arrowhead will appear, whereas if you save the ticket, the line will display without an arrowhead. This is because the Base URI defined does not correlate with whatever mechanism the url() function uses.

I found that if I open an already saved Ticket where the line is missing the arrowheads, I can alter the HTML's Base URI from: <base href="http://themis:8080/tktview <view-source:http://themis:8080/tktview>" />
to:
<base href="http://themis:8080/tktview/149873cca9e566ab28d2b9922e44a515a639c3ff <view-source:http://themis:8080/tktview>" />

or to:

<base href="http://themis:8080/tktview?name=149873cca9 <view-source:http://themis:8080/tktview>" />

and the arrowhead will display.

Likewise, I can edit within the SVG the value for the marker-end attribute from:

url(#se_marker_end_svg_1)
to:

url(http://themis:8080/tktview?name=149873cca9#se_marker_end_svg_1)

and then the arrowhead displays.


-- John Poole


_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to