Hey Mike, "html" and "text" are both valid, see:
http://www.w3schools.com/xsl/el_output.asp
On Thu, 8 Jul 2004, Mike Ferrando wrote:
> Elizabeth S.,
> I think you meant to write the following XSL:
>
> <xsl:output method="text" encoding="ascii"/>
>
> There is no value 'html' for the method attribute.
>
> Mike Ferrando
> Library of Congress
> Washington, DC
>
>
> --- Elizabeth Shaw <[log in to unmask]> wrote:
> > Hi,
> >
> > Okay in the example I gave you I assumed that you wanted your
> > character
> > set in UTF-8. The XSLT processor resolved character entities ot
> > their
> > UTF-8 representations.
> >
> > That is only a problem if you can't read UTF-8 with your software.
> > If
> > you must use the character entities then you should change your
> > character set for the output to ascii or latin-1.
> >
> > So the beginning of your document should look like this
> >
> > <?xml version="1.0" ?>
> > <!DOCTYPE xsl:stylesheet [
> >
> > <!ENTITY nbsp ' '>
> >
> > ]>
> >
> > <xsl:stylesheet version="1.0"
> > xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> >
> > <xsl:output method="html" encoding="ascii"/>
> >
> > This then retains the character entities in the output.
> >
> > There is no reason to use disable output in this case.
> >
> > From a purely technical perspective this is the right way to do
> > this
> > and the others are kluges.
> >
> >
> > As to hte five default entities they are
> > amp
> > lt
> > gt
> > quot
> > apos
> >
> > Each of these have special meaning to processors of XML.
> > The lt sign < is the beginning of the tag
> > the gt >indicates the end of the tag
> > the amp & indicates the beginning of an entity (character or
> > general)
> > the quot " and apos ' are both used to encapsulate the values of
> > attributes.
> > So XML provides entities to "escape" these characters.
> >
> > THe default character set for XML (if you do not state otherwise)
> > is
> > UTF-8. So when processing you need to keep in mind that they are
> > going
> > to resolve entities by default to the UTF-8 character.
> > Any character entity other than the above 5 can be managed by the
> > method
> > above.
> >
> > Liz Shaw
> >
> >
> >
> >
> > Steven Bernstein wrote:
> > > Dear EJ,
> > >
> > > Very good answer. Am curious though, what are the 5
> > default
> > > entities in XML? Steve Bernstein
> > >
> > >
> > >>>>[log in to unmask] 7/7/2004 7:19:27 PM >>>
> > >>>
> > > Since is not one of the 5 default entities in XML you need
> > to
> > > include an entity declaration at the top of your styelsheet.
> > >
> > > <?xml version="1.0"?>
> > >
> > > <!DOCTYPE xsl:stylesheet [
> > >
> > > <!ENTITY nbsp ' '>
> > >
> > > ]>
> > >
> > > <xsl:stylesheet version="1.0"
> > >
> > > .....and so on
> > >
> > >
> > >
> > >
> > > Liz Shaw
> > > Aziza Technology Associates
> > > http://www.azizatech.com
> > >
> > >
> > >
> > > Rees, John (NIH/NLM) wrote:
> > >
> > >>I'm having trouble getting the  : entity to output using XSL.
> > >
> > > From
> > >
> > >>XML.com, <xsl:text disable-output-escaping="yes"><</xsl:text>
> > >>
> > >>produces the angle bracket, but I get a parse error with .
> > >
> > > Perhaps
> > >
> > >>this is an XT issue?
> > >>
> > >>Any advice is appreciated.
> > >>
> > >>John
> > >>
> > >>John P. Rees
> > >>Associate Curator, Modern Manuscripts
> > >>History of Medicine Division
> > >>National Library of Medicine
> > >>8600 Rockville Pike
> > >>Bethesda, MD 20894
> > >>
> > >>Phone: 301.496.8953
> > >>Fax: 301.402.7034
> > >>
> > >>
> > >
> >
>
>
>
>
>
> __________________________________
> Do you Yahoo!?
> New and Improved Yahoo! Mail - 100MB free storage!
> http://promotions.yahoo.com/new_mail
>
|