0

I am searching for a guide(reference) to use svg in xsl:fo because i want to draw checkboxes. I don't know which attributes I can use.

I am using xslt 2.0 and oxygen.

My xsl:fo code now for the checkbox:

<fo:instream-foreign-object> 
    <svg:svg width="5" height="5" xmlns:svg="http://www.w3.org/2000/svg">
        <svg:rect width="5" height="5"  style="stroke-width:5;  stroke:rgb(250,0,0)"/>
        <svg:line/>
    </svg:svg> 
</fo:instream-foreign-object>
alecxe
  • 414,977
  • 106
  • 935
  • 1,083
bvb1909
  • 181
  • 1
  • 6
  • 18
  • Providing external references is off-topic. You need to ask a specific answerable question. What exactly is your problem, what's happening instead? – Robert Longson Jun 03 '15 at 06:54
  • With this code I get a black rectangle but I need to know which attributes can I use in style? are they the same to css? – bvb1909 Jun 03 '15 at 06:59
  • You should get a black rectangle with a red edge. fill : blue; should make it blue. – Robert Longson Jun 03 '15 at 07:22
  • thank you now I have an solution here an link about a good tool: http://www.w3schools.com/svg/tryit.asp?filename=trysvg_rect4 – bvb1909 Jun 03 '15 at 07:24

1 Answers1

0

Not sure what your requirements are, but you might just need a ballot character, like the following (or &#x2611; in XML):

See http://en.wikipedia.org/wiki/Check_mark for alternatives.

Community
  • 1
  • 1
Florent Georges
  • 1,868
  • 1
  • 14
  • 21
  • how can i use these "☑" if I use these in an fo:block i get an # ? – bvb1909 Jun 03 '15 at 11:41
  • 1
    You must use a font that has a glyph for that code point; if you are using Apache FOP you also need to [configure the font](http://stackoverflow.com/q/25895984/4453460). – lfurini Jun 03 '15 at 16:12