www.webdeveloper.com
Results 1 to 4 of 4

Thread: XSLT Output to HTML

  1. #1
    Join Date
    Apr 2003
    Location
    London, UK
    Posts
    59

    XSLT Output to HTML

    I read in Bob DuCharme XSLT Quikly book that the output method="HTML" is used to allow tags such as <br> in the stylesheet. However Marrowsoft Xselerator, MSXSL and Xalan don't process the file but throw an error that <br> doesn't have a closing tag.

    If Bob DuCharme is wrong what's the difference between using HTML and XML as output methods (since XHTML is valid XML)?

  2. #2
    Join Date
    May 2003
    Posts
    550
    All tags in XHTML must be closed.
    <br> Becomes <br></br>
    XHTML allows a quicker version
    <br/>
    But that causes problems in older browsers. Adding a space helps older browsers to render it correctly.
    A <br> in XHTML is
    <br />

  3. #3
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    It is a bit confusing, but your "literal result elements" need to follow the XML rules so that the whole stylesheet is a valid XML document. When generating HTML the processor will convert <br/> and <br></br> to <br>. You might also find that some processor drops some or all tags that are optional in HTML.
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  4. #4
    Join Date
    Apr 2003
    Location
    London, UK
    Posts
    59
    Thanx Charles.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles