scew-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[scew-users] Re: Regarding usage of SCEW


From: Aleix Conchillo Flaqué
Subject: [scew-users] Re: Regarding usage of SCEW
Date: Sat, 11 Sep 2010 01:07:23 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.11) Gecko/20100805 Iceowl/1.0b1 Icedove/3.0.6

Hello,

it's ok to contact me directly, but I think is better to use the mailing lists so other users can look at it (or search through internet). So, I'm forwarding this message to the mailing list (if you don't mind, please subscribe).

I think I would concatenate your two chunks in one (but I don't know where your data comes from). And then, simply do:

    pParser = scew_parser_create ();
    scew_parser_set_element_hook (pParser, element_hook_ , NULL);
pReader = scew_reader_buffer_create((XML_Char const *)fullBuffer, sizeof(fullBuffer));
    scew_parser_load_stream(pParser, pReader);

Then, element_hook_ would be called each time an element is parsed (e.g. <n v=...>).

In your example, you are re-using the pParser twice and you are cheating with the pReader by strcpying pBuf1 and pBuf2. And that's not a very clean way to do things.

The important issue is how your XML data is being received. Where pBuf1 and pBuf2 come from? Can you concatenate them? It is also possible to create your own SCEW reader, you only need to implement a few functions.


Aleix


On 09/10/2010 04:58 PM, Anup Rao wrote:
Hi Aleix,

My name I Anup Jayapal Rao. I work for Prysm Inc. I has contacted you earlier 
with regard to the license terms of SCEW.
I am trying out the stream parser in SCEW and facing an issue. I did not find 
any forum(s) for SCEW and hence considered mailing you directly.
Kindly forgive me if e-mail is not the right channel.

I am posting the problem with a sample attachment. Suggestions to this will 
give me a better understanding of SCEW.

=8<============================================================================================================

Problem: Let us assume that I receive an xml tree in two portions.

Portion A is '<chunk><n v="0"/><n'
And, portion B is 'v="0"/></chunk>'

How must I setup SCEW to parse this split xml tree?
The easiest way is to join the chunks and parse. However, my current need is to 
execute an element hook for the first occurrence
of '<n v="0"/>' as soon as it arrives and execute the element hook for the second'<n 
v="0"/>' when it arrives later.

=8<============================================================================================================

I feel my understanding of SCEW is not strong. Kindly look at the simple c code 
attached for the above mentioned example.
Your suggestions will be very much appreciated.

Regards,
Anup






-----Original Message-----
From: address@hidden [mailto:address@hidden On Behalf Of Aleix Conchillo Flaqué
Sent: Thursday, January 28, 2010 3:04 PM
To: Anup Rao
Cc: Peter Ullmann; Venkatesan Ramamoorthy
Subject: Re: Regarding usage of SCEW

Hello Anup,

I'm glad you use SCEW for your software. Here the answers:

1. Yes, you can link it statically.

2. Does not apply because answer to 1.

3. No, you don't need to publish SCEW source code, but you need to add
a notice that SCEW is being used in your software and that SCEW is
covered by the LGPL license, and also provide a copy of the LGPL
license (v2.1).

I'm not an expert on software licenses, if you have any further
questions you can contact the FSF:

http://www.fsf.org/licensing/contact

Best regards,

Aleix

On Thu, Jan 28, 2010 at 06:29, Anup Rao<address@hidden>  wrote:
Hi Aleix,



My name is Anup Jayapal Rao. I work for Prysm Inc.

We use numerous open source components and would like to be compliant with
their respective licenses.

I develop a software component for our Linux based embedded solution which
uses the SCEW library.

We build the SCEW component as is to generate the “.A” file and statically
link to it.

We make no changes to the SCEW library or the makefiles involved in the
build procedure.



As the license is LGPL, we at Prysm felt it was best to clarify its usage
and licensing from you.

As the author of the SCEW library, kindly let us know the following:

1>      Are we allowed to use the library as described above?

2>      If not, are we permitted to make a shared library by modifying the
makefile and then use it ?

3>      Do we need to publish the source code even though we make no changes
to SCEW?



With Kind Regards,

Anup Jayapal Rao




reply via email to

[Prev in Thread] Current Thread [Next in Thread]