RE: [svg-developers] accessing anchors inside a svg

2005-12-10 Thread Doug Schepers
Hi, Chris-

Chris Lilley wrote:
|
| DS> Problem 2: There is no specified behavior for how 
| fragment IDs are 
| DS> to be treated in SVG. There are many options (it might 
| translate the 
| DS> view so that the element is in the top left of the screen, or the 
| DS> exact center of the screen, or just enough so that it is 
| visible, or 
| DS> it might even change the viewBox so that the element fills up the 
| DS> screen).
| 
| Right. It just has to make the linked-to object visible.

Just to clarify, by "linked-to object" you mean the element bearing the
specified id element and not just the whole document, right? Because from my
reading of "17.2.2 SVG fragment identifiers", there is no requirement to
make the id-element (the fragment identifier) visible.  It says:
 "If the SVG fragment identifier addresses any element other than a 'view'
element, then the document defined by the closest ancestor 'svg' element is
displayed in the viewport using the view specification attributes on that
'svg' element." 

So, if you have a link to 'myfile.svg#myId', if the nearest 'svg' element to
'myId' is the root, and 'myId' is a rect at, say, y='1000' and is outside
the viewport/viewBox, it won't be visible.

Personally, I think that the SVG Spec should specify that 'myfile.svg#myId'
is assumed to be an implicit view that includes the id-element. Much more
intuitive, and the outlier cases are miniscule. When *wouldn't* you want
such behavior? Of course, if the element doesn't have a rendered bbox (say,
in the case of display='none'), it shouldn't attempt change the viewport.


| DS> All of these behaviors are specified for the 'SVG view 
| DS> specification' [2], using syntax like 
| DS> MyDrawing.svg#svgView(viewBox(0,200,1000,1000)), but as far as I 
| DS> know, no viewer has yet imlemented that.
| 
| Its implemented by Batik and by CSIRO.
| 
| (Of course, it could have been implemented by ASV and Corel 
| too, in theory, but we wouldn't know because of the browser 
| those are hosted in).
| 
| DS> This is a real pity, because that rocks. Man... No, instead, all 
| DS> viewers I know about simply ignore the fragment-id.
| 
| Yes, it is. (I would have thought you would be familiar with Batik)

Oh, yeah... I think I heard about that... "Batik," you say? I'll have to
write that one down... ;)

I've got to confess, I didn't check Batik, because I concentrate mostly on
common Web browsers for tasks like this. I meant that it's unimplemented in
ASV, Firefox, and Opera. Thanks for setting me straight.

It does work, as you say, in Batik, but there's a bit of odd behavior... in
the location bar, the fragment identifier is doubled. For instance, 
 svg2.svg#svgView(viewBox(200,200,100,100))
becomes:
 
svg2.svg#svgView(viewBox(200,200,100,100))#svgView(viewBox(200,200,100,100))

No big deal, but I guess I'll file a bug report. BTW, seeing this in action,
it really does rock, as predicted.


Regards-
Doug

[EMAIL PROTECTED]
www.vectoreal.com ...for scalable solutions.
 



 Yahoo! Groups Sponsor ~--> 
1.2 million kids a year are victims of human trafficking. Stop slavery.
http://us.click.yahoo.com/.QUssC/izNLAA/TtwFAA/1U_rlB/TM
~-> 

-
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my 
membership"
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




Re: [svg-developers] accessing anchors inside a svg

2005-12-09 Thread Chris Lilley
On Friday, December 9, 2005, 5:37:27 PM, Doug wrote:

DS> Problem 1: Fragment identifiers (myurl.ext#fragmentID) in IE+ASV get
DS> lost when you are working locally. So, you can link to a Web-based
DS> resource, but not a local one. This problem doesn't exist in
DS> Firefox.

Its a limitation of the Win IE plugin architecture - fragment
identifiers are stripped from the URI before sending to the server (this
is correct) and the fetched local copy of the content is given the
stripped, fragment-less URI instead of the real one (this is broken).

Its been reported since IE4 and  has been promised to be fixed several
times but never is. I would be very surprised if IE7 fixes it.

DS> Problem 2: There is no specified behavior for how fragment IDs are
DS> to be treated in SVG. There are many options (it might translate the
DS> view so that the element is in the top left of the screen, or the
DS> exact center of the screen, or just enough so that it is visible, or
DS> it might even change the viewBox so that the element fills up the
DS> screen).

Right. It just has to make the linked-to object visible.

DS> All of these behaviors are specified for the 'SVG view
DS> specification' [2], using syntax like
DS> MyDrawing.svg#svgView(viewBox(0,200,1000,1000)), but as far as I
DS> know, no viewer has yet imlemented that.

Its implemented by Batik and by CSIRO.

(Of course, it could have been implemented by ASV and Corel too, in
theory, but we wouldn't know because of the browser those are hosted
in).

DS> This is a real pity, because that rocks. Man... No, instead, all
DS> viewers I know about simply ignore the fragment-id.

Yes, it is. (I would have thought you would be familiar with Batik)

DS> Problem 3: This is minor, and isn't the source of your woes, but an ID
DS> attribute cannot start with a number; it must start with an alphabetic
DS> character.


Yes (this is something XML specifies, its not specific to SVG)

DS> That being said, you don't need the elaborate XPointer syntax:
DS>  
DS> is equivalent to:
DS>  

At the time we specified that, it seemed that XPointer would become the
standard fragment syntax for XML in general. That turned out not to
happen.



-- 
 Chris Lilleymailto:[EMAIL PROTECTED]
 Chair, W3C SVG Working Group
 W3C Graphics Activity Lead
 Co-Chair, W3C Hypertext CG



 Yahoo! Groups Sponsor ~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/KIlPFB/vlQLAA/TtwFAA/1U_rlB/TM
~-> 

-
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my 
membership"
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




Re: [svg-developers] accessing anchors inside a svg

2005-12-09 Thread Thomas Liesner
Hi Doug,

Doug Schepers schrieb:

> Problem 1: Fragment identifiers (myurl.ext#fragmentID) in IE+ASV get
> lost when you are working locally. So, you can link to a Web-based
> resource, but not a local one. This problem doesn't exist in Firefox.
>
That wouldn't be a problem for a rather closed community project.

>
> Problem 2: All of these behaviors are specified for the 'SVG view
> specification' [2], using syntax like
> MyDrawing.svg#svgView(viewBox(0,200,1000,1000)), but as far as I
> know, no viewer has yet imlemented that. This is a real pity, because
> that rocks. Man... No, instead, all viewers I know about simply
> ignore the fragment-id.

A pity indeed. This is some sort of "killer"-feature.

>
> Problem 3: This is minor, and isn't the source of your woes, but an
> ID attribute cannot start with a number; it must start with an
> alphabetic character. That being said, you don't need the elaborate
> XPointer syntax:  is
> equivalent to: 

Okay, easy enough to fix ;)

> [1] See: http://svg-whiz.com/svg/xlink/ Start here:
> http://svg-whiz.com/svg/xlink/jumpToId.svg
>
> [2] http://www.w3.org/TR/SVG/linking.html#LinksIntoSVG

Time to start a bit more reading...

> Sorry to be the bearer of bad tidings. Hope this explanation helps.

No worries, you helped alot :)

Thanks,
Tom


 Yahoo! Groups Sponsor ~--> 
Most low income households are not online. Help bridge the digital divide today!
http://us.click.yahoo.com/I258zB/QnQLAA/TtwFAA/1U_rlB/TM
~-> 

-
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my 
membership"
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




RE: [svg-developers] accessing anchors inside a svg

2005-12-09 Thread Doug Schepers
Hi, Tom-

Unfortunately, you are bumping into a limitation of the available viewers,
and possibly a problem with the language. Your example has a flaw, too. I've
encountered this before, and have an example [1].

Problem 1: Fragment identifiers (myurl.ext#fragmentID) in IE+ASV get lost
when you are working locally. So, you can link to a Web-based resource, but
not a local one. This problem doesn't exist in Firefox.

Problem 2: There is no specified behavior for how fragment IDs are to be
treated in SVG. There are many options (it might translate the view so that
the element is in the top left of the screen, or the exact center of the
screen, or just enough so that it is visible, or it might even change the
viewBox so that the element fills up the screen). All of these behaviors are
specified for the 'SVG view specification' [2], using syntax like
MyDrawing.svg#svgView(viewBox(0,200,1000,1000)), but as far as I know, no
viewer has yet imlemented that. This is a real pity, because that rocks.
Man...  No, instead, all viewers I know about simply ignore the fragment-id.
This does not prevent you from creating a script solution that gets the
document location, extracting the id, and changing the viewBox yourself;
I've done that before, but I can't find my example just now.

Problem 3: This is minor, and isn't the source of your woes, but an ID
attribute cannot start with a number; it must start with an alphabetic
character. That being said, you don't need the elaborate XPointer syntax:
 
is equivalent to:
 


[1] See: 
 http://svg-whiz.com/svg/xlink/
Start here:
 http://svg-whiz.com/svg/xlink/jumpToId.svg

[2] http://www.w3.org/TR/SVG/linking.html#LinksIntoSVG


Sorry to be the bearer of bad tidings. Hope this explanation helps.

Regards-
Doug

[EMAIL PROTECTED]
www.vectoreal.com ...for scalable solutions.


Thomas Liesner wrote:
| 
| Hi list,
| 
| i am absolutly new to svg and try to access elements inside the svg.
| Waht i have now ist the following, but that won't work.
| 
| > 
| >"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd";>
| >   xmlns="http://www.w3.org/2000/svg"; version="1.1"
| >  xmlns:xlink="http://www.w3.org/1999/xlink";>
| >   VGA Planets Starmap v0.1a
| >   the actual planets shown as circles
| >   
| >   Ceti Alpha one
| > 
| > Ceti 
| Alpha one
| >   
| >
| >   
| >   Orionis I
| > 
| > Orionis I
| >   
| >   some text as links to planets
| >   
| > Ceti Alpha one
| >   
| >   
| > Orionis I
| >   
| > 
| 
| 
| Could anyone of you point me into the right direction?
| 
| TIA,
| Tom



 Yahoo! Groups Sponsor ~--> 
AIDS in India: A "lurking bomb." Click and help stop AIDS now.
http://us.click.yahoo.com/9QUssC/lzNLAA/TtwFAA/1U_rlB/TM
~-> 

-
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my 
membership"
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




[svg-developers] accessing anchors inside a svg

2005-12-09 Thread Thomas Liesner
Hi list,

i am absolutly new to svg and try to access elements inside the svg.
Waht i have now ist the following, but that won't work.

> 
>"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd";>
>   xmlns="http://www.w3.org/2000/svg"; version="1.1"
>  xmlns:xlink="http://www.w3.org/1999/xlink";>
>   VGA Planets Starmap v0.1a
>   the actual planets shown as circles
>   
>   Ceti Alpha one
> 
> Ceti Alpha one
>   
>
>   
>   Orionis I
> 
> Orionis I
>   
>   some text as links to planets
>   
> Ceti Alpha one
>   
>   
> Orionis I
>   
> 


Could anyone of you point me into the right direction?

TIA,
Tom


 Yahoo! Groups Sponsor ~--> 
AIDS in India: A "lurking bomb." Click and help stop AIDS now.
http://us.click.yahoo.com/9QUssC/lzNLAA/TtwFAA/1U_rlB/TM
~-> 

-
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my 
membership"
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/