Re: [jibx-users] Adding XML information to the XML produced

2008-09-25 Thread Dennis Sosnoski
Laurent PETIT wrote: Hello, 2008/9/24 Dennis Sosnoski [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] The reason the line number sometimes appears off is because it uses the current line when the object is created. ... My example did not have start tags spanning multiple lines.

Re: [jibx-users] Adding XML information to the XML produced

2008-09-24 Thread Laurent PETIT
Hello, 2008/9/24 Dennis Sosnoski [EMAIL PROTECTED] The reason the line number sometimes appears off is because it uses the current line when the object is created. Usually the object is created by unmarshalling a start tag, and because the parser scans the whole start tag (attributes and

Re: [jibx-users] Adding XML information to the XML produced

2008-09-23 Thread Laurent PETIT
Precision, it seems that the line and column information is obtained at unmarshalling time, and added as a derived property of each object. 2008/9/23 Laurent PETIT [EMAIL PROTECTED] Hello, Another thing that is currently done on my project that uses JAXB is that at marshalling time, a custom

Re: [jibx-users] Adding XML information to the XML produced

2008-09-23 Thread Joshua Davies
Yeah, just add track-source to your binding declarations: binding direction=input track-source=true ... Then (after parsing) you can cast any of your bound objects to ITrackSource and retrieve document source information: ITrackSource tracker = ( ITrackSource ) boundObject; System.out.println(

Re: [jibx-users] Adding XML information to the XML produced

2008-09-23 Thread Laurent PETIT
Wow, it's great ! I have it worked in minutes ! Thanks ! But, one more question please : how does the line count work ? It seems to me that while the real line number is 7 (counting from 1), with ITrackSource I get is 8. Is there a logic explanation to this ? Thanks in advance, -- Laurent

Re: [jibx-users] Adding XML information to the XML produced

2008-09-23 Thread Dennis Sosnoski
The reason the line number sometimes appears off is because it uses the current line when the object is created. Usually the object is created by unmarshalling a start tag, and because the parser scans the whole start tag (attributes and all) at once you'll get the line number for the end of

Re: [jibx-users] Adding CDATA to document

2006-10-10 Thread Raymond N. Ritz
Ok, so a little reading of the documentation solved this. There is a style=cdata that I had not seen before. Changing my element to this style resolved my problem. - Hi all, Can anyone tell me how I can add a CData using Jibx For example ... Description![CData[Some Test with Special

[jibx-users] Adding

2006-09-01 Thread Kees de Kooter
This is my class: public class Message { private Integer messageId; ... } And this is the xml I need to produce. ns1:message ns1:id ns2:default=11/ns1:id /ns1:message I need to add some extra (constant) attributes of a different namespace (ns2:default) to the value of message

[jibx-users] Adding attributes of different namespace to a value

2006-09-01 Thread Kees de Kooter
(Sorry - previous message had incomplete subject) This is my class: public class Message { private Integer messageId; ... } And this is the xml I need to produce. ns1:message ns1:id ns2:default=11/ns1:id /ns1:message I need to add some extra (constant) attributes of a different

Re: [jibx-users] Adding attributes of different namespace to a value

2006-09-01 Thread Kees de Kooter
On 9/1/06, Kees de Kooter [EMAIL PROTECTED] wrote: (Sorry - previous message had incomplete subject) This is my class: public class Message { private Integer messageId; ... } And this is the xml I need to produce. ns1:message ns1:id ns2:default=11/ns1:id /ns1:message

Re: [jibx-users] Adding attributes of different namespace to a value

2006-09-01 Thread Kees de Kooter
On 9/1/06, Kees de Kooter [EMAIL PROTECTED] wrote: On 9/1/06, Kees de Kooter [EMAIL PROTECTED] wrote: (Sorry - previous message had incomplete subject) This is my class: public class Message { private Integer messageId; ... } And this is the xml I need to produce.

Re: [jibx-users] Adding a class to a preexisting binding

2005-08-17 Thread Dennis Sosnoski
Hi John, It sounds like you should be able to just define two separate bindings, and select the appropriate binding at runtime. You can separate portions of the binding you want to have in common into a third binding file, and use include to incorporate the shared bindings into each of the