Now I've just used EW to add my first thumbnail to a page with a 4.01
transitional doctype. In the html code, it surprisingly added:
xthumbnail-orig-image="images/myimage.jpg"
EW immediately marked it as incorrect, even though EW itself added the code.
Is this a known issue? Or do I need to change a setting to avoid this?
Cheers,
Charax
> I earlier asked how to remove xthumbnail-orig-image entries from old html
> code (subj: Remove xthumbnail-orig-image).
I couldn't find that post. When did you post it?
> Now I've just used EW to add my first thumbnail to a page with a 4.01
> transitional doctype. In the html code, it surprisingly added:
> xthumbnail-orig-image="images/myimage.jpg"
Surprising indeed. My suggestion is to use XHTML. In XHTML documents, EW
"hides" the proprietary attribute within a comment. I really don't know why
EW creates an invalid attribute in HTML, this seems to be a bug.
Christof,
I posted on 11 Jan 2007, was reminded of RegEx, and used it to delete about
1900 xthumbnail entries.
But EW is creating more of them, so I'm wondering what the problem is. There
must be some ghosts of FrontPage (which is still installed), because when I
create a new page in EW, it inserts a Microsoft Theme meta tag. Just did it
and here is the generated code for a blank html page:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Untitled 1</title>
<meta name="Microsoft Theme" content="parthia 1101, default">
</head>
<body>
</body>
</html>
I forgot to answer your suggestion to use XHTML. Right now its not practical
as I'm still using some FP horizontal nav bots that need the 4.01
transitional doctype to pass w3c html validation.
Thanks,
Charax
"Charax" <chop...@REMOVEameritech.net> wrote in message
news:uYLKA0GX...@TK2MSFTNGP04.phx.gbl:
OK, understand. When I replace the horizontal nav bots (which require the
theme for graphics) then I'll be able to remove the theme.
Thanks much,
Charax
> I posted on 11 Jan 2007, was reminded of RegEx, and used it to delete
> about 1900 xthumbnail entries.
Too bad I missed that post. You should _never_ use regular expressions with
HTML. Fortunately, with Expression Web you don't have to since you are
equipped with a full-blown HTML parser. This VBA macro removes all the
"xthumbnail-orig-image" attributes from the current website:
Sub RemoveXThumbnailAttribute()
Dim wf As WebFile
Dim pw As PageWindow
Dim img As ImgElement
For Each wf In ActiveWeb.AllFiles
If wf.Extension = "htm" Or wf.Extension = "html" Then
Set pw = wf.Edit(PageViewNoWindow)
For Each img In pw.Document.all.tags("img")
img.removeAttribute "xthumbnail-orig-image"
Next
If pw.IsDirty Then pw.Save
pw.Close
End If
Next
End Sub
Just call it e.g. before you publish. You could also move the
"xthumbnail-orig-image" attribute into a comment as in XHTML, but I don't
see this offers any benefit:
...
Const ATTR_NAME As String = "xthumbnail-orig-image"
Dim attrValue As String
attrValue = img.getAttribute(ATTR_NAME)
If attrValue <> "" Then
img.removeAttribute ATTR_NAME
img.parentElement.insertAdjacentHTML "AfterEnd", "<!-- MSComment=""autothumbnail"" xthumbnail-orig-image=""" & attrValue & """ -->"
End If
...
> But EW is creating more of them, so I'm wondering what the problem is.
The problem is a bug in EW which is unlikely to get fixed because it only
affects HTML.
> There must be some ghosts of FrontPage (which is still installed),
After all, Expression Web ist FrontPage 2007.
< snip, snip >
Thanks for the code. This will solve the removal problem.
>> But EW is creating more of them, so I'm wondering what the problem is.
>
> The problem is a bug in EW which is unlikely to get fixed because it only
> affects HTML.
Because it is HTML? That sounds like a good reason to remove the bug; EW is
creating non-standard code!
>> There must be some ghosts of FrontPage (which is still installed),
>
> After all, Expression Web ist FrontPage 2007.
Many thanks for your help,
Charax
>> The problem is a bug in EW which is unlikely to get fixed because it only
>> affects HTML.
>
> Because it is HTML? That sounds like a good reason to remove the bug; EW
> is creating non-standard code!
Yes, but the default in EW is XHTML. I wouldn't be surprised if the next
release did not support HTML any more.