Subject: RE: [xsl] how to embed this complicated set of characters into the result file via an XSL From: "Michael Kay" <mhk@xxxxxxxxx> Date: Sun, 25 Jan 2004 16:34:55 -0000 |
> The problem is that it has such a weird set of characters > that my attempted methods (tried and failed, as explained > below) are not working. Word's angle-bracket syntax is neither XML nor HTML, so neither the XML nor HTML output methods in XSLT can generate it. You have two options: (a) write your own output method (many XSLT processors allow this, for example by subclassing the standard methods) (b) use disable-output-escaping to generate angle-brackets directly, without causing them to be escaped. The first approach is architecturally cleaner, but the second is probably quicker. Michael Kay > > > <html xmlns="http://www.w3.org/TR/REC-html40" > xmlns:v="urn:schemas-microsoft-com:vml" > xmlns:o="urn:schemas-microsoft-com:office:office" > xmlns:w="urn:schemas-microsoft-com:office:word"> > > <head> > > ************ TEXT NEEDED INSIDE THE HEAD: ************************* > > <meta http-equiv="Content-Type" content="text/html; > charset=iso-8859-1"/> <meta name="ProgId" > content="Word.Document"/> <meta name="Generator" > content="Microsoft Word 10"/> <meta name="Originator" > content="Microsoft Word 10"/> <title>Untitled Document</title> > > <!--[if gte mso 9]> > <xml> > <o:DocumentProperties> > <o:Author>word</o:Author> > <o:LastAuthor>word</o:LastAuthor> > <o:Revision>0</o:Revision> > <o:Created>2000-01-01T02:59:00Z</o:Created> > <o:LastSaved>2000-01-01T02:59:00Z</o:LastSaved> > <o:Company>HP</o:Company> > </o:DocumentProperties> > </xml> > <![endif]--> > > <!--[if gte mso 9]> > <xml> > <w:WordDocument> > <w:TrackRevisions/> > </w:WordDocument> > </xml> > <![endif]--> > --> > > ******************************************************************** > > </HEAD> > > METHODS I HAVE TRIED AND FAILED: > > METHOD 1: > > Using a CDATA section: > > <![CDATA[ > > <!--[if gte mso 9]> > <xml> > <o:DocumentProperties> > <o:Author>Luau Document Builder - Rendering Engine - > asanwal@xxxxxxxxxxxxxxxxx</o:Author> > <o:LastAuthor>Luau Document Builder</o:LastAuthor> > <o:Revision>0</o:Revision> > <o:Created>2000-01-01T02:59:00Z</o:Created> > <o:LastSaved>2000-01-01T02:59:00Z</o:LastSaved> > <o:Company>MW2 Conulting</o:Company> > </o:DocumentProperties> > </xml> > <![endif]--> > > <!--[if gte mso 9]> > <xml> > <w:WordDocument> > <w:TrackRevisions/> > </w:WordDocument> > </xml> > <![endif]--> > > ]]> > > > METHOD 2: > > Using an external file where the given text is put with and > without CDATA sections. > > <!DOCTYPE xsl:stylesheet [ > <!ENTITY mswordmarkup SYSTEM "mswordmarkup.dat"> > ]> > > I can never get the required output. The text does not get > included or it gets loaded with < & > stuff. > > BTW - These are the XSL settings I have for the output etc. > > <xsl:stylesheet version="1.0" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > xmlns:fo="http://www.w3.org/1999/XSL/Format"> > <xsl:output method="html" encoding="UTF-8" indent="yes"/> > > > Please suggest a way to get this done so that I can have in > included into my resulting HTML when I execute the XSLs. > > (If you might be suggesting a break up of the given TEXT to > allow inclusion please SHOW me how I should break it up to > have it included AS IT IS NEEDED in the HTML) > > Thanks, > _____________________________________________________ > > Abhishek Sanwal > HP - Houston Campus > > > > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] how to embed this complic, George Cristian Bina | Thread | [xsl] Creating Forward/Backward HTM, Randolph Kahle |
RE: [xsl] dereferencing count() wit, Michael Kay | Date | Re: [xsl] Float values, Mark Williams |
Month |