473,395 Members | 1,885 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Linking generated content

Should linking generated content work? Example:

span:before{content:"foobar"}

<a href="foobar.htm"><span></span></a>

I stumbled across this bit in the CSS2 spec:
Generated content does not alter the document tree. In particular, it is
not fed back to the document language processor (e.g., for reparsing).


It works both in Opera and Mozilla, but should it?

Context: I have an alternate stylesheet switching UI widget on a page, I
don't want that widget to show up in non CSS UA's and if my author
stylesheet is ignored or disabled.
Headless

--
Email and usenet filter list: http://www.headless.dna.ie/usenet.htm
Jul 20 '05 #1
3 2035
Headless <me@privacy.net> wrote:
Should linking generated content work?
I don't think you are linking generated content.
span:before{content:"foobar"}

<a href="foobar.htm"><span></span></a>
You have a link element with a span element with empty content as its
only content. This doesn't sound logical, and its effects on browsers
will vary. Your style sheet does not really link generated content. The
link is there, and the generated content just affects its appearance.
Generated content does not alter the document tree. In particular, it
is not fed back to the document language processor (e.g., for
reparsing).


This means that no markup in generated content is parsed, and the
document's parse tree remains the same - in this case, you still have
just empty content, with span and link markers around it.
It works both in Opera and Mozilla, but should it?
Define "works". Is the linked resource accessible through the link, and
how? Does the link participate in tabbing order? Is it traversed by
indexing robots? How does it appear in a list of all links on the page,
as generated by the browser? And what if CSS is enabled?
Context: I have an alternate stylesheet switching UI widget on a
page, I don't want that widget to show up in non CSS UA's and if my
author stylesheet is ignored or disabled.


If you want to hide something, visually, then visibility: invisible and
display: none would appear to be more logical approaches. Even then, the
question arises whether e.g. an invisible link should be treated as a
link, in the many ways that a document can be processed.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Jul 20 '05 #2
Jukka K. Korpela wrote:
Context: I have an alternate stylesheet switching UI widget on a
page, I don't want that widget to show up in non CSS UA's and if my
author stylesheet is ignored or disabled.


If you want to hide something, visually, then visibility: invisible and
display: none would appear to be more logical approaches.


How do you propose to get that to work in non CSS capable UA's or when
the author stylesheet is ignored or disabled?
Headless

--
Email and usenet filter list: http://www.headless.dna.ie/usenet.htm
Jul 20 '05 #3
In article <ro********************************@4ax.com>,
Headless <me@privacy.net> wrote:
Context: I have an alternate stylesheet switching UI widget on a
page, I don't want that widget to show up in non CSS UA's and if my
author stylesheet is ignored or disabled.


If you want to hide something, visually, then visibility: invisible and
display: none would appear to be more logical approaches.


How do you propose to get that to work in non CSS capable UA's or when
the author stylesheet is ignored or disabled?


As an answer to this and as an advice to the OP:

The widget is obviously reliant on JavaScript. So that is they key. Have
an embedded script generate the content needed for this widget. In the
rare occassion that JS is enabled and CSS is disabled in a DOM-compliant
browser, then no worries; it is obviously disabled for a reason and i
think it is reasonable to assume that the user is aware of this and
realizes that a styleswitcher will not work when no styles are there to
be shown. Unless of course you can detect stylesheets enabled through
JS, but I don't know how to do that.

--
Kris
kr*******@xs4all.netherlands (nl)
"We called him Tortoise because he taught us" said the Mock Turtle.
Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Akbar | last post by:
Hey there, Big-time curiosity issue here... Here's the test code (it's not that long)... it's to display a large number of image links with captions, ideally pulled in from an external file...
0
by: Jimmy Cerra | last post by:
I recently came up with a cool little stylesheet for definition lists. There is a small demostration for the impatient . I hope this helps someone. Here's how I did it. Definition lists are...
12
by: HarveyB | last post by:
I would like to generate non-modal popup windows from ASP.Net code-behind. I have tried using Client Side scripting like "function Test(){ window.open('test.htm',_blank,...
15
by: Rob Ratcliff | last post by:
I'm compiling the latest version of a CORBA ORB called MICO on a Cray X1. It makes heavy use of templates and namespaces. Up until the link step, the C++ source code compiled flawlessly. But, when...
4
by: Gary Hughes | last post by:
Hi all, sometime I posted a problem in here where I was getting the following error from the linker in VS C++ 2003. Linking... GCClass.obj : error LNK2022: metadata operation failed (80131188)...
7
by: wmkew | last post by:
Hello everyone I'm encountering a R6002 Runtime error and several bugs when trying to generate a simple Managed C++ application with .NET 2003. The main problem seems to arise from linking with...
0
by: Tarik Monem | last post by:
I have been working on an all AJAX/DOM web site which is set to go live today and I thought I'd share my discoveries with all of you whom have helped me when I have encountered different issues along...
5
by: fran7 | last post by:
Hi, I have set up a next navigation with this code <% Set NextLink = Server.CreateObject ("MSWC.NextLink") %> <A HREF="<%= NextLink.GetNextURL ("/links.txt") %>">Next Page </A> and a .txt...
4
by: naveenmurthy | last post by:
Hello All, I have created a .mht file in following format. 1. The .mht file contains following htmls. a. MHTLinkingProblem.html b. Left.html c. Right.html d. Start.html
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.