Subject: Re: [xsl] how to embed this complicated set of characters into the result file via an XSL From: "George Cristian Bina" <george@xxxxxxx> Date: Sat, 24 Jan 2004 08:03:13 +0200 |
The "wired" content is inside comments, so you can just use <xsl:comment> around it and either escape the content or put it in a CDATA section. <xsl:comment>[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]</xsl:comment> <xsl:comment><![CDATA[[if gte mso 9]> <xml> <w:WordDocument> <w:TrackRevisions/> </w:WordDocument> </xml> <![endif]]]></xsl:comment> result is: <!--[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]--> Best Regards, George ------------------------------------------------------- George Cristian Bina mailto:george@xxxxxxxxxxxxx <oXygen/> XML Editor - http://www.oxygenxml.com/ ----- Original Message ----- From: "SANWAL, ABHISHEK (HP-Houston)" <abhishek.sanwal@xxxxxx> To: <XSL-List@xxxxxxxxxxxxxxxxxxxxxx> Sent: Saturday, January 24, 2004 7:13 AM Subject: [xsl] how to embed this complicated set of characters into the result file via an XSL > I am attempting to embed the following TEXT into the HEAD of my resultant HTML document that I am renaming to .DOC so that when word opens it TRACKING is enabled. (I found that this markup allows you to create HTML-DOC files that automatically enable and allow tracking). > > This text must be put in the MAINHEAD.XSL file that I use for generating the HEAD of my resultant HTML document. > > 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. > > > <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 -> |
---|---|---|
[xsl] how to embed this complicated, SANWAL, ABHISHEK (HP | Thread | RE: [xsl] how to embed this complic, Michael Kay |
[xsl] how to embed this complicated, SANWAL, ABHISHEK (HP | Date | RE: [xsl] Including inc files in xs, Andreas L. Delmelle |
Month |