Highlighted

is there an SVG expert in the house?

Advisor ,
Oct 12, 2015

Copy link to clipboard

Copied

with a vague view to something a bit like automation, I'm examining some very unexciting graphics … ladders/stacks of boxes with text labels in, usually two or three columns per graphic.

svgQuestion.png

I told you they were unexciting :-}

It seems to me that something like this would be a good candidate for generated svg. I've got as far as writing a test-file, and I've hit a problem: FM and Illustrator take the file in their stride, but Mozilla and my currently-preferred DITA tool XML Mind complain. As far I can understand, they are not happy with the <use> option, which they feel ought to be an element …

If anyone in this generally knowledgeable forum can give me any help writing universally acceptable svg, or even can just confirm I'm on a hiding to nothing trying to use <use>, I'd be grateful. Sample code block follows, in case you need something to check.

<svg width="540" height="720" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">
<defs>
<g id="boxes">
<rect id="lightBox1" x="3" y="0" height="17" width="108" stroke-weight="0.25px" fill="none" stroke="#ddd"/>
<rect id="lightBox2" x="144" y="0" height="17" width="108" stroke-weight="0.25px" fill="none" stroke="#ddd"/>
<rect id="lightBox3" x="288" y="0" height="17" width="108" stroke-weight="0.25px" fill="none" stroke="#ddd"/>
<rect id="greyBox1" x="3" y="0" height="17" width="108" stroke-weight="0.25px" fill="#eee" stroke="#ddd"/>
<rect id="greyBox2" x="144" y="0" height="17" width="108" stroke-weight="0.25px" fill="#eee" stroke="#ddd"/>
<rect id="greyBox3" x="288" y="0" height="17" width="108" stroke-weight="0.25px" fill="#eee" stroke="#ddd"/>
</g>
</defs>
<!-- boxes: y offset increments by 18 -->
<!-- col 1 top -->
<use y="0" xlink:href="#lightBox1" />
<use y="16" xlink:href="#greyBox1" />
<use y="34" xlink:href="#lightBox1" />
<use y="52" xlink:href="#lightBox1" />
<use y="70" xlink:href="#lightBox1" />
<use y="88" xlink:href="#lightBox1" />
</svg>

Views

364

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

is there an SVG expert in the house?

Advisor ,
Oct 12, 2015

Copy link to clipboard

Copied

with a vague view to something a bit like automation, I'm examining some very unexciting graphics … ladders/stacks of boxes with text labels in, usually two or three columns per graphic.

svgQuestion.png

I told you they were unexciting :-}

It seems to me that something like this would be a good candidate for generated svg. I've got as far as writing a test-file, and I've hit a problem: FM and Illustrator take the file in their stride, but Mozilla and my currently-preferred DITA tool XML Mind complain. As far I can understand, they are not happy with the <use> option, which they feel ought to be an element …

If anyone in this generally knowledgeable forum can give me any help writing universally acceptable svg, or even can just confirm I'm on a hiding to nothing trying to use <use>, I'd be grateful. Sample code block follows, in case you need something to check.

<svg width="540" height="720" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">
<defs>
<g id="boxes">
<rect id="lightBox1" x="3" y="0" height="17" width="108" stroke-weight="0.25px" fill="none" stroke="#ddd"/>
<rect id="lightBox2" x="144" y="0" height="17" width="108" stroke-weight="0.25px" fill="none" stroke="#ddd"/>
<rect id="lightBox3" x="288" y="0" height="17" width="108" stroke-weight="0.25px" fill="none" stroke="#ddd"/>
<rect id="greyBox1" x="3" y="0" height="17" width="108" stroke-weight="0.25px" fill="#eee" stroke="#ddd"/>
<rect id="greyBox2" x="144" y="0" height="17" width="108" stroke-weight="0.25px" fill="#eee" stroke="#ddd"/>
<rect id="greyBox3" x="288" y="0" height="17" width="108" stroke-weight="0.25px" fill="#eee" stroke="#ddd"/>
</g>
</defs>
<!-- boxes: y offset increments by 18 -->
<!-- col 1 top -->
<use y="0" xlink:href="#lightBox1" />
<use y="16" xlink:href="#greyBox1" />
<use y="34" xlink:href="#lightBox1" />
<use y="52" xlink:href="#lightBox1" />
<use y="70" xlink:href="#lightBox1" />
<use y="88" xlink:href="#lightBox1" />
</svg>

Views

365

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Oct 12, 2015 0
Advisor ,
Oct 12, 2015

Copy link to clipboard

Copied

cross-posting seemed legitimate, especially as the topic was outside the primary focus of everyday Framing … so here's the answer from the XML Mind support team: I needed an extra declaration to tell the processor about the <use> tag.

xmlns:xlink="http://www.w3.org/1999/xlink"

did the trick, and now I have a neat .svg graphic I can use both inside and outside FrameMaker.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 12, 2015 0