Re: Dom Transformer

2013-03-15 Thread Mansour Al Akeel
I have tags with id's like:

some-section-tag id='109876_n00069  

And those ids are used for links inside the document. They are linked
from different sections.
I like to transform the links and the ids to something that makes sense. Like,

xref href=the-section-title-with-dashes-only  My Link Label/xref

And

The anchor

some-section-tag id='the-section-title-with-dashes-only  

I think this can be done is Stax, xslt or Sax, however, I am trying to
do it in a clean way without any hacks.

Do you have any suggestion ??



On Fri, Mar 15, 2013 at 2:18 PM, gelo1234 gelo1...@gmail.com wrote:
 The question is WHY? you want DOM transformation in Cocoon environment ?

 Greetings,
 -Greg


 2013/3/15 Mansour Al Akeel mansour.alak...@gmail.com

 I know this may sound strange, but I like to create a transformation with
 DOM.
 I was able to see Stax and Sax transformation. I was not able to see
 one for DOM.

 Any advice ?? Examples ??

 -
 To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
 For additional commands, e-mail: users-h...@cocoon.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org



Re: Dom Transformer

2013-03-15 Thread Mansour Al Akeel
Jos, thank you. I though about this.
The problem is, the documents I am processing had to go through a
pipeline processing before I need to use DOM transformation on them.
So a generator is not an option, and I am using C3.


On Fri, Mar 15, 2013 at 2:58 PM, Jos Snellings
jos.snelli...@upperware.biz wrote:
 You can, within a generator class, (C3),
 or within an xsp (C 2).
 Sometimes such things come in handy.

 If you mean, configure one from the sitemap, I see no uses.

 Cheers,
 Jos


 On Fri, Mar 15, 2013 at 7:05 PM, Mansour Al Akeel
 mansour.alak...@gmail.com wrote:

 I know this may sound strange, but I like to create a transformation with
 DOM.
 I was able to see Stax and Sax transformation. I was not able to see
 one for DOM.

 Any advice ?? Examples ??

 -
 To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
 For additional commands, e-mail: users-h...@cocoon.apache.org




 --
 All generous minds have a horror of what are commonly called Facts. They
 are the brute beasts of the intellectual domain.
 -- Thomas Hobbes

-
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org



Re: Dom Transformer

2013-03-15 Thread gelo1234
The question is WHY you want to use DOM is still valid.

C (2 or 3) uses SAX or StaX per default and you can use it in a clean way.
I see no reason to use DOM.

Greetings,
-Greg


2013/3/15 Mansour Al Akeel mansour.alak...@gmail.com

 I have tags with id's like:

 some-section-tag id='109876_n00069  

 And those ids are used for links inside the document. They are linked
 from different sections.
 I like to transform the links and the ids to something that makes sense.
 Like,

 xref href=the-section-title-with-dashes-only  My Link Label/xref

 And

 The anchor

 some-section-tag id='the-section-title-with-dashes-only  

 I think this can be done is Stax, xslt or Sax, however, I am trying to
 do it in a clean way without any hacks.

 Do you have any suggestion ??



 On Fri, Mar 15, 2013 at 2:18 PM, gelo1234 gelo1...@gmail.com wrote:
  The question is WHY? you want DOM transformation in Cocoon environment ?
 
  Greetings,
  -Greg
 
 
  2013/3/15 Mansour Al Akeel mansour.alak...@gmail.com
 
  I know this may sound strange, but I like to create a transformation
 with
  DOM.
  I was able to see Stax and Sax transformation. I was not able to see
  one for DOM.
 
  Any advice ?? Examples ??
 
  -
  To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
  For additional commands, e-mail: users-h...@cocoon.apache.org
 
 

 -
 To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
 For additional commands, e-mail: users-h...@cocoon.apache.org




RE: Dom Transformer

2013-03-15 Thread Robby Pelssers
Exactly…  I don’t have the full picture here but if you provide a small input 
file and expected output file we might come up with an easier solution.  I 
still am not seeing why XSLT can’t get the job done but I hope your input will 
make this obvious.

Robby

From: gelo1234 [mailto:gelo1...@gmail.com]
Sent: Friday, March 15, 2013 8:02 PM
To: users@cocoon.apache.org
Subject: Re: Dom Transformer

The question is WHY you want to use DOM is still valid.
C (2 or 3) uses SAX or StaX per default and you can use it in a clean way. I 
see no reason to use DOM.
Greetings,
-Greg

2013/3/15 Mansour Al Akeel 
mansour.alak...@gmail.commailto:mansour.alak...@gmail.com
I have tags with id's like:

some-section-tag id='109876_n00069  

And those ids are used for links inside the document. They are linked
from different sections.
I like to transform the links and the ids to something that makes sense. Like,

xref href=the-section-title-with-dashes-only  My Link Label/xref

And

The anchor

some-section-tag id='the-section-title-with-dashes-only  

I think this can be done is Stax, xslt or Sax, however, I am trying to
do it in a clean way without any hacks.

Do you have any suggestion ??



On Fri, Mar 15, 2013 at 2:18 PM, gelo1234 
gelo1...@gmail.commailto:gelo1...@gmail.com wrote:
 The question is WHY? you want DOM transformation in Cocoon environment ?

 Greetings,
 -Greg


 2013/3/15 Mansour Al Akeel 
 mansour.alak...@gmail.commailto:mansour.alak...@gmail.com

 I know this may sound strange, but I like to create a transformation with
 DOM.
 I was able to see Stax and Sax transformation. I was not able to see
 one for DOM.

 Any advice ?? Examples ??

 -
 To unsubscribe, e-mail: 
 users-unsubscr...@cocoon.apache.orgmailto:users-unsubscr...@cocoon.apache.org
 For additional commands, e-mail: 
 users-h...@cocoon.apache.orgmailto:users-h...@cocoon.apache.org



-
To unsubscribe, e-mail: 
users-unsubscr...@cocoon.apache.orgmailto:users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: 
users-h...@cocoon.apache.orgmailto:users-h...@cocoon.apache.org



Re: Dom Transformer

2013-03-15 Thread Jos Snellings
Not sure what your usage is, Mansour.

If your program has to generate references to things that 'yet have to
come' in the input stream, of course
you get quickly into thinking 'DOM'-wise.

- I believe Stax can bring outcome, but no experience with this.
- I once wrote a 'SAX-recorder', so somefilter that records SAX-elements,
but do not remember exactly what problem that solved, just that it worked.
- it is possible to trap SAX-events and feed them into a JDom object.
  (I mean, if nothing else works).

Cheers,
Jos










On Fri, Mar 15, 2013 at 8:01 PM, Mansour Al Akeel mansour.alak...@gmail.com
 wrote:

 Jos, thank you. I though about this.
 The problem is, the documents I am processing had to go through a
 pipeline processing before I need to use DOM transformation on them.
 So a generator is not an option, and I am using C3.


 On Fri, Mar 15, 2013 at 2:58 PM, Jos Snellings
 jos.snelli...@upperware.biz wrote:
  You can, within a generator class, (C3),
  or within an xsp (C 2).
  Sometimes such things come in handy.
 
  If you mean, configure one from the sitemap, I see no uses.
 
  Cheers,
  Jos
 
 
  On Fri, Mar 15, 2013 at 7:05 PM, Mansour Al Akeel
  mansour.alak...@gmail.com wrote:
 
  I know this may sound strange, but I like to create a transformation
 with
  DOM.
  I was able to see Stax and Sax transformation. I was not able to see
  one for DOM.
 
  Any advice ?? Examples ??
 
  -
  To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
  For additional commands, e-mail: users-h...@cocoon.apache.org
 
 
 
 
  --
  All generous minds have a horror of what are commonly called Facts.
 They
  are the brute beasts of the intellectual domain.
  -- Thomas Hobbes

 -
 To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
 For additional commands, e-mail: users-h...@cocoon.apache.org




-- 
All generous minds have a horror of what are commonly called Facts. They
are the brute beasts of the intellectual domain.
-- Thomas Hobbes
 http://www.brainyquote.com/quotes/quotes/t/thomashobb118630.html


Re: Dom Transformer

2013-03-15 Thread Javier Puerto
2013/3/15 Mansour Al Akeel mansour.alak...@gmail.com

 I have tags with id's like:

 some-section-tag id='109876_n00069  

 And those ids are used for links inside the document. They are linked
 from different sections.
 I like to transform the links and the ids to something that makes sense.
 Like,

 xref href=the-section-title-with-dashes-only  My Link Label/xref

 And

 The anchor

 some-section-tag id='the-section-title-with-dashes-only  

 I think this can be done is Stax, xslt or Sax, however, I am trying to
 do it in a clean way without any hacks.

 Do you have any suggestion ??


You can do it whithout any hack with all the ways, sax, stax and xslt.

XSLT:

sitemap.xmap

map:transform src=resources/xslt/page2html.xsl
map:parameter name=language value={locale:1}/map:parameter
name=dojoVersion value={global:ch.sobu.dojo.version}/map:parameter
name=staticBaseUri value={global:proxy.static}/map:parameter
name=publicBaseUri value={global:proxy.public}/map:parameter
name=env value={global:ch.sobu.build.env}/map:parameter
name=version value={global:ch.sobu.build.version}//map:transform





 On Fri, Mar 15, 2013 at 2:18 PM, gelo1234 gelo1...@gmail.com wrote:
  The question is WHY? you want DOM transformation in Cocoon environment ?
 
  Greetings,
  -Greg
 
 
  2013/3/15 Mansour Al Akeel mansour.alak...@gmail.com
 
  I know this may sound strange, but I like to create a transformation
 with
  DOM.
  I was able to see Stax and Sax transformation. I was not able to see
  one for DOM.
 
  Any advice ?? Examples ??
 
  -
  To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
  For additional commands, e-mail: users-h...@cocoon.apache.org
 
 

 -
 To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
 For additional commands, e-mail: users-h...@cocoon.apache.org




Re: Dom Transformer

2013-03-15 Thread gelo1234
Seems reasonable. Although its a bit awkward idea.

Simplicity is the key ;)

Greetings,
-Greg


2013/3/15 Jos Snellings jos.snelli...@upperware.biz

 Not sure what your usage is, Mansour.

 If your program has to generate references to things that 'yet have to
 come' in the input stream, of course
 you get quickly into thinking 'DOM'-wise.

 - I believe Stax can bring outcome, but no experience with this.
 - I once wrote a 'SAX-recorder', so somefilter that records SAX-elements,
 but do not remember exactly what problem that solved, just that it worked.
 - it is possible to trap SAX-events and feed them into a JDom object.
   (I mean, if nothing else works).

 Cheers,
 Jos










 On Fri, Mar 15, 2013 at 8:01 PM, Mansour Al Akeel 
 mansour.alak...@gmail.com wrote:

 Jos, thank you. I though about this.
 The problem is, the documents I am processing had to go through a
 pipeline processing before I need to use DOM transformation on them.
 So a generator is not an option, and I am using C3.


 On Fri, Mar 15, 2013 at 2:58 PM, Jos Snellings
 jos.snelli...@upperware.biz wrote:
  You can, within a generator class, (C3),
  or within an xsp (C 2).
  Sometimes such things come in handy.
 
  If you mean, configure one from the sitemap, I see no uses.
 
  Cheers,
  Jos
 
 
  On Fri, Mar 15, 2013 at 7:05 PM, Mansour Al Akeel
  mansour.alak...@gmail.com wrote:
 
  I know this may sound strange, but I like to create a transformation
 with
  DOM.
  I was able to see Stax and Sax transformation. I was not able to see
  one for DOM.
 
  Any advice ?? Examples ??
 
  -
  To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
  For additional commands, e-mail: users-h...@cocoon.apache.org
 
 
 
 
  --
  All generous minds have a horror of what are commonly called Facts.
 They
  are the brute beasts of the intellectual domain.
  -- Thomas Hobbes

 -
 To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
 For additional commands, e-mail: users-h...@cocoon.apache.org




 --
 All generous minds have a horror of what are commonly called Facts. They
 are the brute beasts of the intellectual domain.
 -- Thomas Hobbes
  http://www.brainyquote.com/quotes/quotes/t/thomashobb118630.html



Re: Dom Transformer

2013-03-15 Thread Javier Puerto
2013/3/15 Javier Puerto jpue...@gmail.com



 2013/3/15 Mansour Al Akeel mansour.alak...@gmail.com

 I have tags with id's like:

 some-section-tag id='109876_n00069  

 And those ids are used for links inside the document. They are linked
 from different sections.
 I like to transform the links and the ids to something that makes sense.
 Like,

 xref href=the-section-title-with-dashes-only  My Link Label/xref

 And

 The anchor

 some-section-tag id='the-section-title-with-dashes-only  

 I think this can be done is Stax, xslt or Sax, however, I am trying to
 do it in a clean way without any hacks.

 Do you have any suggestion ??


 You can do it whithout any hack with all the ways, sax, stax and xslt.

 XSLT:
 sitemap.xmap


Sorry, the message was sent by error before the example was finished. :)













 On Fri, Mar 15, 2013 at 2:18 PM, gelo1234 gelo1...@gmail.com wrote:
  The question is WHY? you want DOM transformation in Cocoon environment ?
 
  Greetings,
  -Greg
 
 
  2013/3/15 Mansour Al Akeel mansour.alak...@gmail.com
 
  I know this may sound strange, but I like to create a transformation
 with
  DOM.
  I was able to see Stax and Sax transformation. I was not able to see
  one for DOM.
 
  Any advice ?? Examples ??
 
  -
  To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
  For additional commands, e-mail: users-h...@cocoon.apache.org
 
 

 -
 To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
 For additional commands, e-mail: users-h...@cocoon.apache.org





Re: Dom Transformer

2013-03-15 Thread Javier Puerto
2013/3/15 Mansour Al Akeel mansour.alak...@gmail.com

 I have tags with id's like:

 some-section-tag id='109876_n00069  

 And those ids are used for links inside the document. They are linked
 from different sections.
 I like to transform the links and the ids to something that makes sense.
 Like,

 xref href=the-section-title-with-dashes-only  My Link Label/xref

 And

 The anchor

 some-section-tag id='the-section-title-with-dashes-only  

 I think this can be done is Stax, xslt or Sax, however, I am trying to
 do it in a clean way without any hacks.

 Do you have any suggestion ??


XSLT sample:

You can add the following transformation to oyur pipeline sitemap.xmap:

map:transform src=resources/xslt/uuid2title.xsl/

And create an xslt file that maches the elements you want to change
uuid2title.xsl

xsl:template match=some-section-tag/@id
  xsl:attribute name=id
xsl:value-of select=replace([your tile node xpath],  , )/
  /xsl:attribute
/xsl:template

I hope that helps, I've not tested it. With SAX and StAX it's similar but
written in java, you have to locate the element you are looking for and
replace the attribute with the new one. Most times XSLT is enough, SAX and
StAX is used if you have to do some business logic.

DOM is not good idea because is not event based and Cocoon pipeline is
based on XML events so to work with DOM you have to do double work,
transform to DOM and generate SAX or StAX events later to hook the pipeline.

Salu2.





 On Fri, Mar 15, 2013 at 2:18 PM, gelo1234 gelo1...@gmail.com wrote:
  The question is WHY? you want DOM transformation in Cocoon environment ?
 
  Greetings,
  -Greg
 
 
  2013/3/15 Mansour Al Akeel mansour.alak...@gmail.com
 
  I know this may sound strange, but I like to create a transformation
 with
  DOM.
  I was able to see Stax and Sax transformation. I was not able to see
  one for DOM.
 
  Any advice ?? Examples ??
 
  -
  To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
  For additional commands, e-mail: users-h...@cocoon.apache.org
 
 

 -
 To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
 For additional commands, e-mail: users-h...@cocoon.apache.org




Re: Dom Transformer

2013-03-15 Thread Mark H. Wood
On Fri, Mar 15, 2013 at 02:58:37PM -0400, Mansour Al Akeel wrote:
 I have tags with id's like:
 
 some-section-tag id='109876_n00069  
 
 And those ids are used for links inside the document. They are linked
 from different sections.
 I like to transform the links and the ids to something that makes sense. Like,
 
 xref href=the-section-title-with-dashes-only  My Link Label/xref
 
 And
 
 The anchor
 
 some-section-tag id='the-section-title-with-dashes-only  
 
 I think this can be done is Stax, xslt or Sax, however, I am trying to
 do it in a clean way without any hacks.
 
 Do you have any suggestion ??

I well understand the appeal of keeping the whole document around for
random access. :-) But have you considered xsl:key?  It sound like you
want to accumulate a symbol table and fetch useful properties of the
symbols when you see them again.

I'm only brainstorming here.  I haven't yet used xsl:key myself.  But
if I don't expose my ignorance once in a while, I'll never learn. :-)
If you find my suggestion helpful, I'd like to see how you used it.

-- 
Mark H. Wood, Lead System Programmer   mw...@iupui.edu
There's an app for that:  your browser


pgpDlNmzRGMDQ.pgp
Description: PGP signature


Re: from Cforms to Wicket

2013-03-15 Thread David Legg

All the cool people swear by caniuse.com [1]  ;-)

Another very new resource is the WebPlatform.org site [2] which is in 
alpha at the moment but is the first collaboration between all the major 
browser manufacturers to document the browser standards and collate bugs.


So to answer Mika's question: HTML5 is already widely supported by 
browsers.  Or to put it another way the HTML5 doctype was designed to be 
usable without breaking older browsers but also prevent them going into 
quirks mode.   Scripts like modernizr [3],  also enable very old 
browsers (even IE6!) to partially support some of the more desirable 
CSS3 functions.


I don't know about you but 20% of my traffic is mobile based. Whatever 
forms you do generate it is looking more and more like you also need to 
support Responsive Web Design which adapts to the browser window size 
and device input capabilities.  We are living in interesting times at 
the moment from a web perspective and for the past year people have been 
rushing to 'do responsive' by placing most of the logic client side and 
making extensive use of media queries.  Some people are beginning to 
wake up to the fact that it might be better to do a little device 
detection server-side with a technique that Luke Wrobleski coined 'RESS' 
[4]. This is something for which I think Cocoon might be a good solution.


One final thing you may find of interest is a side project of Wicket 
which I tinkered with a while ago called WicketWebBeans [5].  I have no 
idea if it is still being developed but essentially it dynamically 
creates web forms by directly interrogating java beans.  You can tailor 
the behaviour according to your needs.


Regards,
David Legg

[1] http://caniuse.com/
[2] http://www.webplatform.org/
[3] http://modernizr.com/
[4] http://www.lukew.com/ff/entry.asp?1392
[5] http://wicketwebbeans.sourceforge.net/

On 18/02/13 12:24, Francesco Chicchiriccò wrote:

On 18/02/2013 13:21, Mika M Lehtonen wrote:
Is HTML5 something you can really use already having wide range of 
browsers supported?

(Or at least FF, IE and Chrome)


Google says (among others)

http://www.findmebyip.com/litmus/