O'Reilly Forums: Where Does That Non-well-formed Meta Element Come From? - O'Reilly Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Where Does That Non-well-formed Meta Element Come From?

#1 User is offline   jyurow 

  • Active Member
  • PipPip
  • Group: Members
  • Posts: 31
  • Joined: 02-November 10

Posted 16 November 2010 - 02:12 PM

All of the XSL course files generate HTML files that have a malformed meta tag in the head portion of the HTML markup. I see nothing in the XSL file that would generate such a tag, so I am unable to fix it. The malformed tag does not seem to affect the browser's rendering of the HTML, but it clearly offends Oxygen, which gives it a big red mark in the right-hand margin. The tag is:

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

Note that the above tag is not followed by an end tag </meta> nor does the it end with an "/>".
0

#2 User is offline   robbiego 

  • New Member
  • Pip
  • Group: Members
  • Posts: 7
  • Joined: 05-October 10

Posted 29 November 2010 - 10:29 AM

Hi @jyurow

Just wanted to make sure you saw that Bob partially addressed your question in class last week... He uses the following "hack" in the xsl in order to ensure the closing tag doesn't get dropped in the transformation:

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<xsl:text> </xsl:text>
</meta>

However, I say "partially addressed" because some of the xsl files from the class omit the explicit meta element, and, as you pointed out, those result in the malformed meta element in the html. I experimented with different transformers but none of them created a correctly-formed meta tag. Hmmmmm.
0

#3 User is offline   jyurow 

  • Active Member
  • PipPip
  • Group: Members
  • Posts: 31
  • Joined: 02-November 10

Posted 01 December 2010 - 01:14 PM

I tried Bob's hack by copying it word for word and pasting it just after the HTML <head> tag in photoTitleIndex.xsl. I then ran the transformation and, lo and behold, it drops the </meta> end tag from photoTitleIndex.html and then has the unmitigated gall to complain that the </meta> end tag is missing! angry.gif
0

#4 User is offline   Bob Boiko 

  • Active Member
  • PipPip
  • Group: O'Reilly Author
  • Posts: 19
  • Joined: 04-October 10

Posted 01 December 2010 - 04:51 PM

QUOTE (jyurow @ Dec 1 2010, 01:14 PM) <{POST_SNAPBACK}>
I tried Bob's hack by copying it word for word and pasting it just after the HTML <head> tag in photoTitleIndex.xsl. I then ran the transformation and, lo and behold, it drops the </meta> end tag from photoTitleIndex.html and then has the unmitigated gall to complain that the </meta> end tag is missing! angry.gif


Right, well this is not a simple issue. Depending on whether you want HTML or XML output you use a different <xsl:output> statement. I have avoided the issue here alltogether, but I will spend some time on it in the next class.

Here is a video to give you a taste for why I have avoided it:

http://www.youtube.com/watch?v=dQgOGT4Vnt0
0

#5 User is offline   logon68 

  • New Member
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 03-December 10

Posted 03 December 2010 - 04:18 AM

thanks robbiego for advice
0

#6 User is offline   jyurow 

  • Active Member
  • PipPip
  • Group: Members
  • Posts: 31
  • Joined: 02-November 10

Posted 07 December 2010 - 11:01 AM

Thanks, Bob. The video says it all!

This post has been edited by jyurow: 07 December 2010 - 11:02 AM

0

#7 User is offline   sinicline 

  • New Member
  • Pip
  • Group: Members
  • Posts: 7
  • Joined: 18-December 11
  • Gender:Male

Posted 15 April 2012 - 11:09 PM

thanks robbiego!
[url="http://www.sinicline.net"]My link[/url]
0

#8 User is offline   xiaomo 

  • New Member
  • Pip
  • Group: Members
  • Posts: 3
  • Joined: 05-June 12
  • Gender:Male

Posted 05 June 2012 - 01:48 AM

thnk you ...
http://www.haveadress.com
0

#9 User is offline   Bess1212002 

  • New Member
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 19-December 12

Posted 19 December 2012 - 08:16 PM

the tag "meta" often is <meta />.the " /"is important.

laptop battery store
laptop battery
laptop AC adapter
coredless drill battery
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users