Jump to content


Photo

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


  • Please log in to reply
8 replies to this topic

#1 jyurow

jyurow

    Active Member

  • Members
  • PipPip
  • 31 posts

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 "/>".

#2 robbiego

robbiego

    New Member

  • Members
  • Pip
  • 7 posts

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.

#3 jyurow

jyurow

    Active Member

  • Members
  • PipPip
  • 31 posts

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

#4 Bob Boiko

Bob Boiko

    Active Member

  • O'Reilly Author
  • PipPip
  • 19 posts

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:



#5 logon68

logon68

    New Member

  • Members
  • Pip
  • 1 posts

Posted 03 December 2010 - 04:18 AM

thanks robbiego for advice

#6 jyurow

jyurow

    Active Member

  • Members
  • PipPip
  • 31 posts

Posted 07 December 2010 - 11:01 AM

Thanks, Bob. The video says it all!

Edited by jyurow, 07 December 2010 - 11:02 AM.


#7 sinicline

sinicline

    New Member

  • Members
  • Pip
  • 7 posts
  • Gender:Male

Posted 15 April 2012 - 11:09 PM

thanks robbiego!

#8 xiaomo

xiaomo

    New Member

  • Members
  • Pip
  • 3 posts
  • Gender:Male

Posted 05 June 2012 - 01:48 AM

thnk you ...

#9 Bess1212002

Bess1212002

    New Member

  • Members
  • Pip
  • 1 posts

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 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users