OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] character references in parameter values


>>>>> "Bob" == Bob Stayton <bobs@sagehill.net> writes:

    Bob> I have just noticed that when I pass in a text string as a
    Bob> parameter on the command line, any character references are
    Bob> escaped. For example:

    Bob>   &#x2021;

    Bob> becomes

    Bob>   &amp;#x2021;

    Bob> In my output, I get the literal string "&#x2021;" instead of
    Bob> my special character.

    Bob> This seems to be the case with both xsltproc and saxon.  

And Gestalt too.

    Bob> If the parameter is defined inside the stylesheet, then the
    Bob> ampersand is *not* escaped and the character is properly
    Bob> interpreted.  This seems inconsistent, but maybe I'm missing
    Bob> something.

Yes, I think you are.

If the parameter is defined inside the stylesheet, then it is part of
an XML document, and so is read by the XML parser as a character
reference.

If the value is given on the command line as a string, then it is just
text. No XML parser will be invoked.
-- 
Colin Adams
Preston Lancashire


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]