Re: numbered tags for an array

2006-06-28 Thread Fabian Sergio de Rosa

i think that's to hard to make
test if you can

person
 nameAname/name
 order1/name
/person
person
 nameAnothername/name
 order2/name
/person

that's most easy to do and most easy to map and understand.


2006/6/28, Stefano Orselli [EMAIL PROTECTED]:


Hi to all!
I've a problem.
I transform a bean to an xml file, and after i process this xml file with
fop.
I've an array (or a collection) but when i create (via betwixt) the xml
file
i find all the tags for the array value without numeration:
example
..
nameFrancesca/name
nameStefano/name
nameMassimo/name
..
but for a lot of reasons i want numbered tags:
example
..
name1Francesca/name1
name2Stefano/name2
name2Massimo/name2
..
is there a solution?
Thanks
Ciao
Stefano


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




Re: numbered tags for an array

2006-06-28 Thread Mike Sparr - www.goomzee.com
order1/name was just a typo and not well-formed XML...  The point he was
trying to make is to have some other element with your numbering or you
could also have an attribute with the name tag:

person
  name order=1Aname/name
/person
person
  name order=2Bname/name
/person
...

Cheers,


Mike


On 6/28/06 9:23 AM, Stefano Orselli [EMAIL PROTECTED] wrote:

 Thank Fabian
 i don't understand the tag: order1/name
 start with order and finish with name? Which type of variable have this
 characteristic in java?
 This type of indentation don't resolva my problem with xsl-fo where i select
 a single field with: person/name
 If you have some response write me!
 Ciao
 Stefano
 - Original Message -
 From: Fabian Sergio de Rosa [EMAIL PROTECTED]
 To: Jakarta Commons Users List commons-user@jakarta.apache.org
 Sent: Wednesday, June 28, 2006 3:15 PM
 Subject: Re: numbered tags for an array
 
 
 i think that's to hard to make
 test if you can
 
 person
  nameAname/name
  order1/name
 /person
 person
  nameAnothername/name
  order2/name
 /person
 
 that's most easy to do and most easy to map and understand.
 
 
 2006/6/28, Stefano Orselli [EMAIL PROTECTED]:
 
 Hi to all!
 I've a problem.
 I transform a bean to an xml file, and after i process this xml file with
 fop.
 I've an array (or a collection) but when i create (via betwixt) the xml
 file
 i find all the tags for the array value without numeration:
 example
 ..
 nameFrancesca/name
 nameStefano/name
 nameMassimo/name
 ..
 but for a lot of reasons i want numbered tags:
 example
 ..
 name1Francesca/name1
 name2Stefano/name2
 name2Massimo/name2
 ..
 is there a solution?
 Thanks
 Ciao
 Stefano
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



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



Re: numbered tags for an array

2006-06-28 Thread Mike Sparr - www.goomzee.com
Here are 3 ways you could form the XML (also potential xpath syntax - don't
quote me on the attribute lookup w/ @ symbol - it's been a while and you may
just write [EMAIL PROTECTED] instead of adding the slash element/@attribute?
- it should get you close):

person order=1
  nameAname/name
/person

To get order:  /person/@order
To get name: /person/name

...

person
  nameAname/name
  order1/order
/person

To get order:  /person/order
To get name: /person/name

...

person
  name order=1Aname/name
/person

To get order:  /person/name/@order
To get name: /person/name

--

I think it's purely preference on how you design your XML as long as it's
well-formed.  You'll have to read between the lines when people give you
examples as there will be typos but you can understand what they meant...
If my syntax above is incorrect, at least you can see what I was trying to
do and make the syntax correct...  :)

Hope this helps!


Mike



On 6/28/06 9:22 AM, Mike Sparr - www.goomzee.com [EMAIL PROTECTED] wrote:

 order1/name was just a typo and not well-formed XML...  The point he was
 trying to make is to have some other element with your numbering or you
 could also have an attribute with the name tag:
 
 person
   name order=1Aname/name
 /person
 person
   name order=2Bname/name
 /person
 ...
 
 Cheers,
 
 
 Mike
 
 
 On 6/28/06 9:23 AM, Stefano Orselli [EMAIL PROTECTED] wrote:
 
 Thank Fabian
 i don't understand the tag: order1/name
 start with order and finish with name? Which type of variable have this
 characteristic in java?
 This type of indentation don't resolva my problem with xsl-fo where i select
 a single field with: person/name
 If you have some response write me!
 Ciao
 Stefano
 - Original Message -
 From: Fabian Sergio de Rosa [EMAIL PROTECTED]
 To: Jakarta Commons Users List commons-user@jakarta.apache.org
 Sent: Wednesday, June 28, 2006 3:15 PM
 Subject: Re: numbered tags for an array
 
 
 i think that's to hard to make
 test if you can
 
 person
  nameAname/name
  order1/name
 /person
 person
  nameAnothername/name
  order2/name
 /person
 
 that's most easy to do and most easy to map and understand.
 
 
 2006/6/28, Stefano Orselli [EMAIL PROTECTED]:
 
 Hi to all!
 I've a problem.
 I transform a bean to an xml file, and after i process this xml file with
 fop.
 I've an array (or a collection) but when i create (via betwixt) the xml
 file
 i find all the tags for the array value without numeration:
 example
 ..
 nameFrancesca/name
 nameStefano/name
 nameMassimo/name
 ..
 but for a lot of reasons i want numbered tags:
 example
 ..
 name1Francesca/name1
 name2Stefano/name2
 name2Massimo/name2
 ..
 is there a solution?
 Thanks
 Ciao
 Stefano
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



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