[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XML to "HTML"

  • From: Andrew Welch <andrew.j.welch@gmail.com>
  • To: "David A. Lee" <dlee@calldei.com>
  • Date: Mon, 23 Nov 2009 13:09:47 +0000

Re:  XML to "HTML"
Just run it through an XSLT transform with the output method set to html.

cheers
andrew

2009/11/23 David A. Lee <dlee@calldei.com>:
> I'm faced with the 'interesting' request of the web team to produce HTML not
> XHTML.
>
> The request came to encode empty elements like  <BR/> as <BR>  (and <HR/> as
> <HR>)
> The rationale is that they are trying for maximum browser compatibility and
> CSS style capabilities.
>
> Although they could not actually point to an actual current case where using
> XTHML syntax breaks things, nonetheless they are insisting on not using it,
> "just in case" , "for maximimal conformity".
>
> They also requested that if I use a tag that takes bodies but the body is
> empty to not write it as <tag/>
> Example
>   <P/>  should be written as <P></P>  ....  although I think I can waffle on
> this one.
>
> So I'm tasked now with having to convert reasonably good HTML into 'perfect'
> HTML mainly fixing up these empty tags.
>
> Any suggestions ? The proposal from the web team was "Just use perl to do
> regex replacements" ... Ug.
> I'm not going to use perl.   But I might resort to the equivlent of using
> Java regex replacements on the final output phase.
> But maybe there is a 'better' way to do this ?   I'm not enough familiar
> with XSLT to know but it does have an "html" mode ... will it do this kind
> of thing ?
> I'm hoping I don't need to write my own serializer and have to actcually
> *parse* the 'HTML' to generate these reqirements ... so maybe a regex is the
> best fit ?
> I'd love to run it through a trivial xquery or xslt filter in "make the web
> team happy" mode ...
>
> Other suggestions welcome.
>
> --
> David A. Lee
> dlee@calldei.com  http://www.calldei.com
> http://www.xmlsh.org
> 812-482-5224
>
>
> _______________________________________________________________________
>
> XML-DEV is a publicly archived, unmoderated list hosted by OASIS
> to support XML implementation and development. To minimize
> spam in the archives, you must subscribe before posting.
>
> [Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
> Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
> subscribe: xml-dev-subscribe@lists.xml.org
> List archive: http://lists.xml.org/archives/xml-dev/
> List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
>
>



-- 
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/

  • References:

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2011 All Rights Reserved.