[
https://issues.apache.org/jira/browse/FOP-2308?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13808900#comment-13808900
]
Chris Bowditch commented on FOP-2308:
-------------------------------------
Hi All,
I don't think Luis was randomly deviating from the XSL 1.1 specification, as
suggested above. XSL 1.1 doesn't define the behaviour for the rest of the word
when using text-transform="capitalize" Whether or not we should follow CSS2 to
the letter seems less clear to me. At least in HTML you can use Javascript to
achieve what you need.
What is clear is that the use case of an acronym within a sentence is an edge
case. if you know you have an acronym in a sentence and also want to ensure the
first letter of each word is capitalized then you could do something like:
<fo:block text-transform="capitalize">a sentence to be capitalized in
<fo:inline text-transform="uppercase">FOP</fo:inline></fo:block>
That seems reasonable for an edge case scenario like acronyms within sentences
to be capitalized. Without adjusting the rest of the word the usefulness of the
capitalize function is greatly deminished, and having the entire word processed
is far more useful. After all text-transform="lowercase" and
text-transform="uppercase" processes the entire word, so it seems reasonable
that Capitalize should do the same.
Thanks,
Chris
> text-transform="capitalize" assumes input text is lowercase
> -----------------------------------------------------------
>
> Key: FOP-2308
> URL: https://issues.apache.org/jira/browse/FOP-2308
> Project: Fop
> Issue Type: Bug
> Reporter: Luis Bernardo
> Fix For: trunk
>
> Attachments: test.fo
>
>
> <fo:block text-transform="capitalize">CAPITALIZE</fo:block> should output
> Capitalize, not CAPITALIZE as it does currently.
--
This message was sent by Atlassian JIRA
(v6.1#6144)