These forums are currently read-only due to receiving more spam than actual discussion. Sorry.

It is currently Sat Dec 02, 2017 4:06 pm Advanced search

<BASE> elements could make using "styling" i

Do you think the HTML spec should do something differently? You can discuss spec feedback here, but you should send it to the WHATWG mailing list or file a bug in the W3C bugzilla for it to be considered.

<BASE> elements could make using "styling" i

Postby urbanjost » Sat Mar 01, 2008 11:05 pm

================================================================================
* What is the problem you are trying to solve?

I find one of the most commonly broken links in a document (not
including references to links external to a site) are the images used
for "styling" and "navigation" versus "content". These types of images
(used for customized list bullets or section breaks, for example) are
by far the most commonly reused files by their very nature. I think if
there were an easy way to maintain a base URI for just such images but
not other document-specific images and URI references that documents
using such images would be easier to maintain.

Personally, I like to have a single directory called "images" with
subdirectories called "bullets" and "breaks" and "background" and
so on for such imagery; and find maintaining the pathnames to these
images an issue because no HTML element really lends itself to easily
pointing to these shared images and also to relative paths for the
rest of my document (at least without using full URIs, which are not
always accessible).

================================================================================
* What is the feature you are suggesting to help solve it?

If the <BASE> metalanguage could be repeated with unique qualifications
such as file suffixes or element types, It could make document maintenance
easier

CONCEPT I: named bases

<base href="../" >
<base prefix="breaks" href="http://hostname/images/bars" >
-----------------
<base prefix="bullets" href="/../../images/bullets" >
-----------------
:
:
<!-- elements that can reference images could reference the "prefix" -->
<img prefix="bullets" src="sun.jpg">
--------------

I believe this or some similar extension to the <BASE> element would
make it easier to maintain references to these reused "style"
images.

Being able to define a base in a CSS class might be another alternative;
then CSS style sheets and a CLASS= reference could do the same thing,
and even let you switch between alternate versions, for example.

Basically, <BASE> is not very useful as-is, but could be with
such an extension.

================================================================================
* What is the processing model for that feature, including error
handling? This should be very clear, including things such as
event timing if the feature involves events, how to create graphs
representing the data in the case of semantic proposals, etc.

The same as the current <BASE> element

================================================================================
* Why do you think browsers would implement this feature?

This change is especially important for documents that are maintained
in multiple locations such as stand-alone installations not connected
to the Internet (that makes using full URI addresses for "styling"
images or anything else almost impossible).

There have already been browser implementations that supported multiple
general <BASE> entries, indicating the current implementation is lacking.

Otherwise, at some point <BASE> will probably become another deprecated
element, raising compatibility issues and other problems in the future.
Anything that is probably used in less than 1 out of 17 documents that
has been around this long is probably going to be a headache. Why not
extend it and make it more useful instead?

================================================================================
* Why do you think authors would use this feature?

It would be easier to reuse images without making multiple copies or
embedding them in documentation.

I think the <BASE> element is relatively rarely used because you often
want your real unique document content to be hierarchal; you just want
a base for reused elements such as "styling" images or audio.

================================================================================
* What evidence is there that this feature is desperately needed?

The number of sites with "navigation" images or "styling"
images missing, especially older sites (indicating this is an easy
problem to have creep into your documents).

Actually, it seems there should be some way to distinguish between
"content" images and "styling" images in general, which might lend
itself to other approaches, but nothing more satisfying than this
proposal has come to mind.
================================================================================
urbanjost
<h5>
 
Posts: 16
Joined: Sun Feb 03, 2008 3:48 am

Postby Hixie » Sun Mar 02, 2008 10:15 pm

I don't really understand the problem. Could you elaborate on that?
Hixie
<h5>
 
Posts: 10
Joined: Tue Feb 06, 2007 8:21 pm

basic problem example

Postby urbanjost » Tue Mar 04, 2008 2:56 am

Lets say your coorporation has a large collection of button icons at
http://headquarters/images/buttons; that you found a nice selection of
images for making section dividers created by a co-worker at ../../../graphics/png/bars and that you have created a multi-file document
whose content in layed out in directories chap1, chap2, chap3, and so on.
Your actual content lends itself perfectly to using relative paths. It is maintained locally while you are working on it, but releases are periodically
placed on a web server; so the relative paths are by far the best layout for
your actual content. So you cannot use <BASE> for the re-usable graphic
elements or you are forced to use full URIs for your document sections. This means you are forced to use full URIs for the graphics. But if you could use
BASE to create multiple named bases then you can keep all your graphic references much shorter, and much more maintainable. If the BASE names could be maintained in an external file like a *.css or *.js file, then if the image directory moves you could change a single file and all your image paths would be updated. This is just one relatively common case where being able to specify multiple BASE elements keyed to a name would make HTML maintenance easier.
urbanjost
<h5>
 
Posts: 16
Joined: Sun Feb 03, 2008 3:48 am

Postby PMB9 » Thu Mar 13, 2008 4:21 pm

Do you nedd the xml base standard?

You could exclude the xml:base-attribut with xml include or you could use http://yourserver/base/bullets/* as a Redirection to your base.

Example:
Code: Select all
<img xml:base="http://yourserver/base/images/" src="sun.jpg">
http://yourserver/base/ is a redirection to your current  base.
PMB9
<h3>
 
Posts: 50
Joined: Sat Jan 26, 2008 5:38 pm


Return to Feedback on the Specs

Who is online

Users browsing this forum: No registered users and 1 guest