I'd like to migrate my site to xhtml.
For new documents, I'm using XSLT. But for existing
collections we have a pretty extensive DSSSL codebase
we are not anxious to abandon. There are about 300,000
pages generated with the docbook dsssl out of 5
separate works, so the effort in migrating to XSLT for
those collections would be substantial.
My problem is that html/dbtable.dsl creates upper-case
tags and attributes.
I'd be glad to work on converting these to lower case
if the changes would have a chance of getting back into
the repository.
Is there some fundamental reason we cannot output
lower-case HTML tags?
Logged In: YES
user_id=118135
As a workaround unless/until a change gets made to the
DSSSL stylesheets, you could run your content through
tidy(1). I use it like this:
tidy -imn -asxhtml foo.html
That modifies (-m switch = modify in place) the file
in-place. If you want to write the converted output to
a separate file, do this:
tidy -in -asxhtml foo.html > bar.html
Logged In: YES
user_id=1671
It's easy enough to work around - I can think of several
ways to do it, including tidy. Some have drawback - in tha
case of tidy, it can reorder HTML tags and (php) processing
instructions, potentially creating invalid output from the
web server.
In any case, yes, coming up with workarounds is not hard.
But it seems like folding down the case of the tags the
dsssl is not hard either, and would be the right way to go
if there's a possibility of getting it into the main code base.
Logged In: YES
user_id=118135
To let you know, I am not one of the maintainers of the
DSSSL stylesheets and I don't actually use them myself;
I'm just trying to help you out.
> I'd be glad to work on converting these to lower case
> if the changes would have a chance of getting back
> into the repository.
I think the only way anybody would agree to that would
be if you could manage to make lowercase output an
option, with the default behavior remaining to be
uppercase. I don't personally know why it was decided
to make it uppercase to begin with, but changing it to
lowercase now risks breaking scripts and other things
that users may have set up over the years that rely on
string-matching against the uppercase names in the output.
And from looking at the code, it seems like you would
basically need to add a condition for every single
(make element gi: "FOO") instance where an HTML tag is
output. I doesn't look like it could be controlled
conditionalput. Unless there is some parameter on the
"make element" function for specifying case.
> It's easy enough to work around - I can think of
> several ways to do it, including tidy. Some have
> drawback - in tha case of tidy, it can reorder HTML
> tags and (php) processing instructions, potentially
> creating invalid output from the web server.
A better workaround might be to use sgml2xml/osx/sx:
sgml2xml -xlower foo.html
I don't think that has any of the drawbacks that tidy does.