DO NOT REPLY [Bug 14057] - [PATCH] implement text-transform

2002-11-04 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14057.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14057

[PATCH] implement text-transform

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WONTFIX



--- Additional Comments From [EMAIL PROTECTED]  2002-11-04 15:37 ---
As discussed on dev mailing list, we will not do this work in the maintenance 
branch. This patch will be resubmitted if and when it can be reworked for the 
trunk.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




DO NOT REPLY [Bug 14057] New: - [PATCH] implement text-transform

2002-10-29 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14057.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14057

[PATCH] implement text-transform

   Summary: [PATCH] implement text-transform
   Product: Fop
   Version: 0.20.4
  Platform: All
OS/Version: All
Status: NEW
  Severity: Enhancement
  Priority: Other
 Component: general
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


This patch implements the text-transform property. It correctly handles every 
English-language nuance that I have been able to think of. It adds fields to 
each FOText object that point to previous  next FOText objects within the same 
Block, so that the text in related FOText objects can be considered for needed 
context. It then transforms the text as part of the FOText Constructor. Some of 
the fields and methods added may be useful for other parts of FOP as well. This 
code assumes that words do not span multiple blocks.

Caveat: I cannot think of any, but if there are cases (now or in the future)
where FOText objects do not have ancestor Block objects, text-transform will 
not be able to consider other FOText objects for context. This can be fixed by 
storing the Block-like ancestor instead.

Caveat: The definition of word for purposes of this property is ambiguous. It 
may need to be tweaked over time, especially for scripts other than Latin. I 
have tried to build an infrastructure that will allow such modifications to be 
pretty easily implemented.

Victor Mote ([EMAIL PROTECTED])

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




DO NOT REPLY [Bug 14057] - [PATCH] implement text-transform

2002-10-29 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14057.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14057

[PATCH] implement text-transform





--- Additional Comments From [EMAIL PROTECTED]  2002-10-29 18:37 ---
Created an attachment (id=3651)
xsl-fo document for testing features of text-transform

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: [PATCH] text-transform support

2002-07-22 Thread J.Pietschmann

Oleg Tkachenko wrote:
 Hello there!
 
 In spite of text-transform non-recommended status and i18n issues I 
 believe fop can rely on java i18n support and implement this property 
 using toUpperCase()/toLowerCase() stuff.
 +case TextTransform.CAPITALIZE:
 +boolean isFirst = true;
 +for (int i=0; ilength; i++) {

The problem is that
   fo:wrapper text-transform=capitalizeefo:wrapper
x/fo:wrappertensible/fo:wrapper

will create three FOText objects, holding e, x and
tensible. With your algorithm it would probably capitalize
to EXTensible. The other approach, doing text transformation
as the text is added to a line, wont work either because of
the current small-caps implementation (see FOText.addText()),
and I'd rather keep small caps than text transformations.

The third nail are the actual i18n issues, because text
transformations are language dependent. Ok, only for a very
few real characters (IIRC see Unicode special casing
  http://www.unicode.org/Public/3.2-Update/SpecialCasing-3.2.0.txt),
but I think the German szlig is still widely used in the
FOP audience.

Actually, IIRC text transformations were added to FO because CSS
had them, but I can't quite remember the original use cases for
CSS. I vaguely remember some issues with pseudo classes, which
are not problems in XSLFO.

As long as nobody comlains loudly, I think we'll leave this out.

J.Pietschmann



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: [PATCH] text-transform support

2002-07-22 Thread Oleg Tkachenko

J.Pietschmann wrote:

 The problem is that
   fo:wrapper text-transform=capitalizeefo:wrapper
x/fo:wrappertensible/fo:wrapper
 
 will create three FOText objects, holding e, x and
 tensible. With your algorithm it would probably capitalize
 to EXTensible. 
You right. I had feeling it's wrong place, but after testing on xep test 
suite decided all right.

 The other approach, doing text transformation
 as the text is added to a line, wont work either because of
 the current small-caps implementation (see FOText.addText()),
 and I'd rather keep small caps than text transformations.
That doesn't help either, they are 3 different chunks till LineArea's
addText() method and I have not enough courage to sink into this 400 
lines method, so... forget it. :)

-- 
Oleg Tkachenko
Multiconn International, Israel


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




[PATCH] text-transform support

2002-07-21 Thread Oleg Tkachenko

Hello there!

In spite of text-transform non-recommended status and i18n issues I 
believe fop can rely on java i18n support and implement this property 
using toUpperCase()/toLowerCase() stuff.
Here is suggested patch.

-- 
Oleg Tkachenko
Multiconn International, Israel


Index: fop-cvs/xml-fop/src/codegen/foproperties.xml
===
RCS file: /home/cvspublic/xml-fop/src/codegen/foproperties.xml,v
retrieving revision 1.25.2.4
diff -u -r1.25.2.4 foproperties.xml
--- fop-cvs/xml-fop/src/codegen/foproperties.xml1 Jul 2002 19:11:54 -  
 1.25.2.4
+++ fop-cvs/xml-fop/src/codegen/foproperties.xml21 Jul 2002 19:45:07 -
@@ -1266,7 +1266,13 @@
   property
 nametext-transform/name
 inheritedtrue/inherited
-datatypeToBeImplemented/datatype
+datatypeEnum/datatype
+  enumeration
+value const=NONEnone/value
+value const=CAPITALIZEcapitalize/value
+value const=UPPERCASEuppercase/value
+value const=LOWERCASElowercase/value
+  /enumeration
 defaultnone/default
   /property
   property
Index: fop-cvs/xml-fop/src/org/apache/fop/fo/FOText.java
===
RCS file: /home/cvspublic/xml-fop/src/org/apache/fop/fo/FOText.java,v
retrieving revision 1.24.2.3
diff -u -r1.24.2.3 FOText.java
--- fop-cvs/xml-fop/src/org/apache/fop/fo/FOText.java   6 Jul 2002 19:05:29 -  
 1.24.2.3
+++ fop-cvs/xml-fop/src/org/apache/fop/fo/FOText.java   21 Jul 2002 19:45:09 -
@@ -44,7 +44,31 @@
 super(parent);
 this.length = b.length();
 this.ca = new char[this.length];
-b.getChars(0,length,ca,0);
+switch (parent.properties.get(text-transform).getEnum()) {
+case TextTransform.UPPERCASE:
+(b.toString().toUpperCase()).getChars(0,length,ca,0);
+break;
+case TextTransform.LOWERCASE:
+(b.toString().toLowerCase()).getChars(0,length,ca,0);
+break;
+case TextTransform.CAPITALIZE:
+boolean isFirst = true;
+for (int i=0; ilength; i++) {
+char c = b.charAt(i);
+if (!Character.isLetter(c))
+isFirst = true;
+else if (isFirst) {
+c = Character.toUpperCase(c);
+isFirst = false;
+}
+else
+c = Character.toLowerCase(c);
+ca[i] = c;
+}
+break;
+default:
+b.getChars(0,length,ca,0);
+}
 }
 
 public void setUnderlined(boolean ul) {



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]


text-transform

2001-08-28 Thread ektan


hi,
Anyone know how to work with the text-transform in fo:block?


Thanks for any help you can give.


best rgds,
ektan





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: text-transform

2001-08-28 Thread Daniel Knapp

 Anyone know how to work with the text-transform in fo:block?

There's good information about FO at
 http://www.ibiblio.org/xml/books/bible2/chapters/ch18.html

It's a chapter from the XML Bible S.E. If it can't help you, ask me again.
:-)

MfG, Daniel

-- 
Daniel Knapp [EMAIL PROTECTED]
int a=1,b,c=2800,d,e,f[2801],g;main(){for(;b-c;)f[b++]=a/5;for(;d=0,
g=c*2;c-=14,printf(%.4d,e+d/a),e=d%a)for(b=c;d+=f[b]*a,f[b]=d%--g,d/=
g--,--b;d*=b);} berechnet Pi auf 800 Stellen genau. :-)


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: text-transform

2001-08-28 Thread ektan


hi,

Thanks Daniel,  I have go though the website that you recommended to me.
But, I found that the text-transform doesn't work in fo:block, so, can you
help me?


Thank you.


best rgds,
ektan








-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: text-transform

2001-08-28 Thread Daniel Knapp

 Thanks Daniel,  I have go though the website that you recommended to me.
 But, I found that the text-transform doesn't work in fo:block, so, can you
 help me?


Well, I've used text-transform in fo:inline-tags, 'cause it makes more
sense there (I don't want to make a whole block e.g. uppercase).

AFAIK has FOP limited text-transform-support.
(see http://xml.apache.org/fop/implemented.html - text-transform isn't
listed in '2) Properties').

MfG, Daniel

-- 
Daniel Knapp [EMAIL PROTECTED]
int a=1,b,c=2800,d,e,f[2801],g;main(){for(;b-c;)f[b++]=a/5;for(;d=0,
g=c*2;c-=14,printf(%.4d,e+d/a),e=d%a)for(b=c;d+=f[b]*a,f[b]=d%--g,d/=
g--,--b;d*=b);} berechnet Pi auf 800 Stellen genau. :-)


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: Text-Transform

2001-06-22 Thread John Wyman

Yes, It does work under .12, I hacked the code to put it in as
font-variant for now. I'll try the XSLT translate.
Thanks
John


John H. Wyman
5160 Darry Lane
Dublin, OH 43016
(614)-889-0698
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
Wyman Genealogy Site http://www.wyman.org
Francis Wyman Assoc email List
http://groups.yahoo.com/group/FrancisWymanAssoc
Wyman Family Genealogy Forum http://genforum.genealogy.com/wyman/
The Wyman Surname Message Board
http://www.familyhistory.com/messages/messages.asp?category=surnamefor
um=Wyman

  

-Original Message-
From: Christian Geisert [mailto:[EMAIL PROTECTED]] 
Sent: Friday, June 22, 2001 12:53 PM
To: [EMAIL PROTECTED]
Subject: Re: Text-Transform


 John Wyman wrote:
 
 I need to produce all capital output from possibly mixed input text, 
 and the text-transform=uppercase seems to generate a not supported 
 warning, this used to work in .12, am I doing something wrong ?

Are you really sure that it worked with FOP 0.12 ?
It is not supported in current FOP.

I actually have running code for text-transform, it just needs a bit
cleanup and testing (read: I need some time...)

Or you can use XSLT for this:  translate(text,'abcd','ABCD')

 John H. Wyman


Christian

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Text-Transform

2001-06-21 Thread John Wyman
Title: Message



I need to produce 
all capital output from possibly mixed input text, and the 
text-transform="uppercase" seems to generate a not supported warning, this used 
to work in .12, am I doing something wrong ?

fo:block 
font-family="serif" text-align="centered" font-size="18pt" line-height="36pt" 
text-transform="uppercase"

John H. Wyman5160 Darry LaneDublin, OH 
43016(614)-889-0698[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]Wyman 
Genealogy Site http://www.wyman.orgFrancis Wyman Assoc 
email List http://groups.yahoo.com/group/FrancisWymanAssocWyman 
Family Genealogy Forum http://genforum.genealogy.com/wyman/The 
Wyman Surname Message Board http://www.familyhistory.com/messages/messages.asp?category=surnameforum=Wyman