You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Jose Correia <jo...@exinet.co.za> on 2000/05/04 13:30:17 UTC

Re: question regarding XSLTProcessor - to Scott

>> Would it be possible to modify the DTM so
>> that by default it expands but calling setShouldExpandEntityRefs(false)
>> actually does it.

>Yes, probably.  I suspect it be a little bit of work... you would have to
>change DTMProxy to implement EntityReference, and set the structure for an
>entity ref in the DTM array.

What I meant was, would the Xalan dev team be willing to modify it?

Scott Boag/CAM/Lotus wrote:

> Are these only character refs?  If so, it might be better to write a custom
> serializer?
>
> > Would it be possible to modify the DTM so
> > that by default it expands but calling setShouldExpandEntityRefs(false)
> > actually does it.
>
> Yes, probably.  I suspect it be a little bit of work... you would have to
> change DTMProxy to implement EntityReference, and set the structure for an
> entity ref in the DTM array.
>
> > "What is it &#180;to&#180; be?"
>
> If this is the only kind of character refs that are a problem, you can
> probably fix this by changing the output encoding to "US-ASCII"
> (<xsl:output encoding="US-ASCII"/>).
>
> -scott
>
>
>                     jose@exinet.c
>                     o.za (Jose           To:     xalan-dev@xml.apache.org
>                     Correia)             cc:     Lisa Retief <li...@exinet.co.za>, (bcc: Scott Boag/CAM/Lotus)
>                                          Subject:     question regarding XSLTProcessor
>                     05/03/2000
>                     05:12 AM
>                     Please
>                     respond to
>                     xalan-dev
>
>
>
> Hi all
>
> I'm sucessfully converting this xml file using an XSLT transformation in
> to OEB xml compatible file. Everything works fine except I don't want to
> expand entity references in the source tree (which will be carried
> through to the result tree). I am aware that the Xalan Document Table
> Model does not do this and according to the documentation it tells me to
> instead instantiate the XSLT Processor with the XercesLiaison. I did
> this (although the XercesLiaison is to be used if using a DOM input or
> output which is not the case) but it still expands the entity
> references. Is this a bug? Would it be possible to modify the DTM so
> that by default it expands but calling setShouldExpandEntityRefs(false)
> actually does it.
>
> Here is part of the source code with an entity reference :
> "What is it &#180;to&#180; be?"
>
> Which unfortunately expands to "What is it ´to´ be?"
>
> Thanks and regards
> Jose Correia
> Exinet (pty) Ltd
> Cape Town
> South Africa
> --
>
>                 \=/,         _-===-_-===-_-===-_-===-_-==-_
>                 |  @___oo  (                               )_
>       /\  /\   / (___,,,}_--=                                )
>      ) /^\) ^\/ _)        =_"Positive thinking - a great way  )
>      )   /^\/   _)         (_        to face life"             )
>      )   _ /  / _)          (        Jose Correia            )
>  /\  )/\/ ||  | )_)          (_    jose@exinet.co.za        )
> <  >      |(,,) )__)           (   jcorreia@global.co.za    )
>  ||      /    \)___)\           (_                        _)
>  | \____(      )___) )___          -==-_______-=====-___==
>   \______(_______;;; __;;;

--

                \=/,         _-===-_-===-_-===-_-===-_-==-_
                |  @___oo  (                               )_
      /\  /\   / (___,,,}_--=                                )
     ) /^\) ^\/ _)        =_"Positive thinking - a great way  )
     )   /^\/   _)         (_        to face life"             )
     )   _ /  / _)          (        Jose Correia            )
 /\  )/\/ ||  | )_)          (_    jose@exinet.co.za        )
<  >      |(,,) )__)           (   jcorreia@global.co.za    )
 ||      /    \)___)\           (_                        _)
 | \____(      )___) )___          -==-_______-=====-___==
  \______(_______;;; __;;;