Jump to content

View source of HTML page not seen properly.


ramjosh

Recommended Posts

Hi,

 

I have generated HTML pages from XML files by applying XSL file using PHP.

Ex: http://thatskannada.oneindia.in/news/2009/04/05/ls-election-who-will-win-in-karnataka.html

These are unicode bases files.

 

When I go to view source of this page I wont be able to see the line breaks. Actually these line breaks helps me to see meta title and description properly. Currently these are in the same line.

Like, <title>Lok Sabha Election 2009 | BJP | Congress | JDS | Karnataka - ಲೋಕಸಭೆ: ಕರ್ನಾಟಕದಲ್ಲಿ ಗೆಲ್ಲುವ ಕುದುರೆಗಳು  - Oneindia Kannada</title><meta name="title" content="ಲೋಕಸಭೆ: ಕರ್ನಾಟಕದಲ್ಲಿ ಗೆಲ್ಲುವ ಕುದುರೆಗಳು "></meta>................

 

I want to have proper line breaks.

 

The following is the XSL piece of code.

 

<?xml version="1.0"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"  xmlns:php="http://php.net/xsl" xmlns:date="http://exslt.org/dates-and-times"  extension-element-prefixes="date" exclude-result-prefixes= "php">

<xsl:output method="html" indent="yes"  doctype-public ="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system = "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" />

<head>

<title><xsl:value-of select="Data/title"/> - Oneindia Kannada</title>

<meta name="title"><xsl:attribute name="content"><xsl:value-of select="Data/headline" /></xsl:attribute></meta>

<meta name="Generator" content="Greynium CMS" />

<meta http-equiv="content-language" content="ta" />

<meta name="robots" content="index, follow" />

<meta http-equiv="Pragma" content="no-cache" />

<meta http-equiv="Cache-Control" content="no-cache" />

<meta content="document" name="resource-type" />

<meta content="global" name="distribution" />

<meta name="rating" content="General" />

<meta name="Description"> <xsl:attribute name="content"><xsl:value-of select="Data/description"/></xsl:attribute></meta>

<meta name="Keywords"><xsl:attribute name="content"><xsl:value-of select="Data/keywords"/></xsl:attribute></meta>

 

..........................

 

Can anybody help me in giving line breaks for the view source? I tried with \n\r in different way but nothing happend.

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.