Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SVG Won't Scroll in Firefox 3.0.10

73 views
Skip to first unread message

adamp

unread,
Jun 8, 2009, 11:35:44 PM6/8/09
to
I have generated a large SVG file. The resulting image that gets
displayed is cropped at the edge of the browser window. No scroll
bars appear allowing me to scroll out to the hidden parts of th
image. Is there a way in Firefox to fix this? Is there a way to tell
SVG to fit on the screen that Firefox will adhere to?

long...@gmail.com

unread,
Jun 9, 2009, 3:40:37 AM6/9/09
to

You should see scrollbars with this...

<svg xmlns="http://www.w3.org/2000/svg" width="4000" height="4000">
</svg>

Since you didn't post an example I'm not sure what you are doing
instead.

Best regards

Robert

oliver

unread,
Aug 7, 2009, 4:40:46 PM8/7/09
to
Hi, that solve the issue i already use it and works, but someone have
an idea of how to add this line using xsl transformation?
I try tu use:
<xsl:template match="svg:svg/@viewBox">
<xsl:attribute name="xmlns" >
<xsl:value-of select="'http://www.w3.org/2000/svg'"/>
</xsl:attribute>
</xsl:template>
But didn't allow me to use xmlns as attribute name, any ideas?

HelderMagalhaes

unread,
Aug 10, 2009, 11:28:42 AM8/10/09
to
Hi oliver,


> I try tu use:
>         <xsl:template match="svg:svg/@viewBox">
>                 <xsl:attribute name="xmlns" >
>                         <xsl:value-of select="'http://www.w3.org/2000/svg'"/>
>                 </xsl:attribute>
>         </xsl:template>
> But didn't allow me to use xmlns as attribute name, any ideas?

It seems like you are trying to add an attribute ("xmlns") to an
attribute ("viewBox")? That doesn't make much sense... ;-p

I'd suggest you get more familiar with XML [1] and XSLT [2]. Of course
this could be caused by an accidental distraction. :-)


Hope this helps,
Helder


[1] http://www.w3schools.com/xml/
[2] http://www.w3schools.com/xsl/

Martin Honnen

unread,
Aug 10, 2009, 12:29:40 PM8/10/09
to
oliver wrote:
> Hi, that solve the issue i already use it and works, but someone have
> an idea of how to add this line using xsl transformation?
> I try tu use:
> <xsl:template match="svg:svg/@viewBox">
> <xsl:attribute name="xmlns" >
> <xsl:value-of select="'http://www.w3.org/2000/svg'"/>
> </xsl:attribute>
> </xsl:template>
> But didn't allow me to use xmlns as attribute name, any ideas?

In the XSLT data model a namespace declaration is not an attribute node,
it is a namespace node. However there is no need to create namespace
nodes in the result tree, simply create elements or attributes in the
namespace they belong to.

If you want to create an element node or attribute node in a certain
namespace then simply do that e.g.
<xsl:template match="foo">
<svg xmlns="http://www.w3.org/2000/svg">
...
</svg>
</xsl:template>
creates a result element with local name 'svg' in the SVG namespace
'http://www.w3.org/2000/svg'.

--

Martin Honnen
http://msmvps.com/blogs/martin_honnen/

0 new messages