Re: [docbook-apps] html pass thru

From
Bob Stayton <>
Date
2009-07-26T16:22:46+00:00
ID
035b01ca0e0d$4af53cb0$6400a8c0@pazu
Thread
Re: [docbook-apps] html pass thru
Hi Eric,

You must be using an edition of my book earlier 
than the current 4th edition, because now that is chapter 12.

 

Anyway, the & in the URL must be escaped as 
&amp; in each instance.  These will be written to the HTML output as 
&amp; and that is ok, because browsers accept &amp; and interpret them 
as & when reading an HTML file (but not when reading a URL on the browser 
URL input line).

 

I presume you are  closing the <a> tag 
after some link text, as that is required for well-formedness.

 

Bob Stayton
Sagehill Enterprises


 

 

  
----- Original Message ----- 

  
From: 
  Eric Hagemann 

  
To: Bob Stayton ;  
  

  
Sent: Sunday, July 26, 2009 4:14 AM

  
Subject: Re: [docbook-apps] html pass 
  thru

  

  
Bob,

  
    I am looking at chap 11 -- 
  HTML customizations section on Inserting HTML code in the page content -- If 
  it helps I am using the 3rd edition of your book.  By the way, thanks for 
  putting the effort into the book, very very useful.

  
 

  
    Anyway here is the the 
  offending line of html code.  Its a link to a product on amazon.com and 
  was supplied by amazon.  The transformation engine does not like the 
  &tag saying it needs to end with a semicolon.

  
 

  
    I was hoping to just escape 
  the html and let it pass thru but I am also interested in how to fix the html 
  -- if that is easier

  
 

  
<a href="http://www.amazon.com/gp/product/B00009R6WY?ie=UTF8&tag=sp&linkCode=as2&camp=1789&creative=9325&creativeASIN=B00009R6WY">

  
 

  
thanks

  
Eric

  
    
----- Original Message ----- 

    
From: 
    Bob Stayton 
    

    
To: Eric Hagemann ;  
    

    
Sent: Sunday, July 26, 2009 12:34 
    AM

    
Subject: Re: [docbook-apps] html pass 
    thru

    

    
Hi Eric,

    
I presume you mean Chapter 12, HTML 
    Customizations.  I think the section you are referring to needs some 
    clarification.

    
 

    
I'm not sure, but I don't think POST has 
    anything to do with the problem.  Most likely the input is not 
    well-formed XML.

    
 

    
In order for an XSLT processor to xsl:copy any 
    content, that content must be well-formed XML, and typical HTML is not 
    well-formed XML. If the content has HTML markup, then simply wrapping 
    the content in an element does not make it well-formed.  That only 
    applies if the content is text such as Javascript.  The third paragraph 
    in this section mentions that any HTML markup must be well-formed 
    markup:

    
 

    
http://www.sagehill.net/docbookxsl/InsertExtHtml.html

    
 

    
The xsl:output can still be method="html", and 
    the processor will convert your well-formed XML back into plain HTML.  
    

    
 

    
If that still doesn't work, then post an 
    example.

    
 

    
Bob Stayton
Sagehill Enterprises


    
 

    
 

    
      
----- Original Message ----- 

      
From: 
      Eric Hagemann 

      
To:  
      

      
Sent: Saturday, July 25, 2009 5:55 
      PM

      
Subject: Re: [docbook-apps] html pass 
      thru

      

      
I have been able to follow the examples in 
      the DocBook XSL guide and have inserted the code as per Chapter 11 but I 
      am still having issues since the html is a href with POST parameters that 
      is causing the transformation engine to choke.  I have treated the 
      HTML as malformed and done as suggested -- wrapped the html in proper xml 
      tags <badcode> html </badcode> but still no luck

      
 

      
 

      
        
----- Original Message ----- 

        
From: 
        Eric Hagemann 

        
To:  
        

        
Sent: Saturday, July 25, 2009 5:41 
        PM

        
Subject: [docbook-apps] html pass 
        thru

        

        
Hello,

        
    Seems like a simple 
        thing that I should be able to find in help -- but to no 
        avail.

        
 

        
   I am writing contect destined 
        for web output and I want to place some html within the docbook xml and 
        have it pass thru unaltered.  I want the html to be "live" and thus 
        CDATA will not work

        
 

        
    Is there a processing 
        instruction for such a purpose ?

        
 

        
Cheers

        
Eric