Csound Csound-dev Csound-tekno Search About

Re: [Cs-dev] CSD and XML

Date2009-02-19 11:14
Fromvictor
SubjectRe: [Cs-dev] CSD and XML
I see, would there be a way in which the code tags ( and
) could by default behave like CDATA, in other words, no
need to include extra tags?
----- Original Message ----- 
From: "Steven Yi" 
To: "Developer discussions" 
Sent: Thursday, February 19, 2009 1:05 AM
Subject: Re: [Cs-dev] CSD and XML


> One simple way would be to wrap all text content between our normal
> tags with CDATA so that everything in between is interpreted as text.
> This would allow all of the <'s and >'s to not have to be escaped as
> < and >.  That'd probably the simplest solution I think.
>
> On Wed, Feb 18, 2009 at 1:31 PM, victor  wrote:
>> I'm very ignorant on this, so what would be needed to
>> make our CSD file standard into proper XML?
>>
>> Would that be desirable?
>> ------------------------------------------------------------------------------
>> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, 
>> CA
>> -OSBC tackles the biggest issue in open source: Open Sourcing the 
>> Enterprise
>> -Strategies to boost innovation and cut costs with open source 
>> participation
>> -Receive a $600 discount off the registration fee with the source code: 
>> SFAD
>> http://p.sf.net/sfu/XcvMzF8H
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>>
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, 
> CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the 
> Enterprise
> -Strategies to boost innovation and cut costs with open source 
> participation
> -Receive a $600 discount off the registration fee with the source code: 
> SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel 


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2009-02-19 13:31
FromDave Seidel
SubjectRe: [Cs-dev] CSD and XML
If the goal it to allow the CSD data to be properly parsed by an XML 
parser, then using the CDATA wrappers as Steven suggested is the only 
practical way.  Otherwise, the text would have to follow the rules for 
an XML text node, which would disallow the use of the '<' character (at 
the very least).

Adding these wrappers is not so bad if you are using an editor that can 
add them automatically for you, but if people must be relied upon to 
enter them by hand, errors will occur, as the syntax is not so 
human-friendly.  Consider:



The beginning and ending of the wrapper (" I see, would there be a way in which the code tags ( and
> ) could by default behave like CDATA, in other words, no
> need to include extra tags?
> ----- Original Message ----- 
> From: "Steven Yi" 
> To: "Developer discussions" 
> Sent: Thursday, February 19, 2009 1:05 AM
> Subject: Re: [Cs-dev] CSD and XML
> 
> 
>> One simple way would be to wrap all text content between our normal
>> tags with CDATA so that everything in between is interpreted as text.
>> This would allow all of the <'s and >'s to not have to be escaped as
>> < and >.  That'd probably the simplest solution I think.
>>
>> On Wed, Feb 18, 2009 at 1:31 PM, victor  wrote:
>>> I'm very ignorant on this, so what would be needed to
>>> make our CSD file standard into proper XML?
>>>
>>> Would that be desirable?

-- 
~DaveSeidel = [
   http://mysterybear.net,
   http://daveseidel.tumblr.com,
   http://twitter.com/DaveSeidel
];


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2009-02-19 13:51
FromVictor.Lazzarini@nuim.ie
SubjectRe: [Cs-dev] CSD and XML
AttachmentsNone  None  None  None  

Date2009-02-19 14:03
FromPinball
SubjectRe: [Cs-dev] CSD and XML


Victor Lazzarini wrote:
> 
> 
> I see, would there be a way in which the code tags ( and
> ) could by default behave like CDATA, in other words, no
> need to include extra tags?
> 
> 

It might depend on the kind of xml parser you use.
There are at least two kind of parser. 

A) The Reader
B) The DOM builder

The reader scans the file sequentially. As you come across
the "CsInstruments" tag (getNextTag), you may decide to 
get the "innerXml" as a whole (getInnerXml). 

getNextTag and getInnerXml names come out of my immagination
but i guess every implementation has something like that.


-- 
View this message in context: http://www.nabble.com/CSD-and-XML-tp22091671p22101082.html
Sent from the Csound - Dev mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2009-02-19 14:21
FromJonatan Liljedahl
SubjectRe: [Cs-dev] CSD and XML
BTW, what was the reasoning when deciding for the XML-ish CSD format?
It's a bit odd to mix syntaxes in the same file like that... I'd rather
see something more in the line of csounds existing syntax:

opts
  ...
endopts

instr N
  ...
endin

...

score
  ...
endscore

Dave Seidel wrote:
> If the goal it to allow the CSD data to be properly parsed by an XML 
> parser, then using the CDATA wrappers as Steven suggested is the only 
> practical way.  Otherwise, the text would have to follow the rules for 
> an XML text node, which would disallow the use of the '<' character (at 
> the very least).
> 
> Adding these wrappers is not so bad if you are using an editor that can 
> add them automatically for you, but if people must be relied upon to 
> enter them by hand, errors will occur, as the syntax is not so 
> human-friendly.  Consider:
> 
>  
> instr 1
> ...
> endin
> 
> ]]>
> 
> The beginning and ending of the wrapper (" exactly intuitively obvious.
> 
> The logical question is: what's the advantage of making the CSD format 
> compliant with XML?  HTML formats prior to XHTML are similarly 
> "pseudo-XML" in format, but it's no big deal -- one way or another, you 
> have to write a parser.
> 
> - Dave
-- 
/Jonatan         [ http://kymatica.com ]

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2009-02-19 18:26
FromAnthony Kozar
SubjectRe: [Cs-dev] CSD and XML
I don't know what the original rationale was but it is similar to the
Cecilia document format.  I think there are advantages to the "XML-ish"
format such as allowing ANY text outside of the recognized tags to be
included without comment characters (thus allowing extensive documentation
or program notes at the beginning of the file), and frontend programs can
easily add their own tagged sections to a CSD and have them ignored by
Csound and other frontends.

Anthony Kozar
mailing-lists-1001 AT anthonykozar DOT net
http://anthonykozar.net/

Jonatan Liljedahl wrote on 2/19/09 9:21 AM:

> BTW, what was the reasoning when deciding for the XML-ish CSD format?
> It's a bit odd to mix syntaxes in the same file like that... I'd rather
> see something more in the line of csounds existing syntax:
> 
> opts
> ...
> endopts
> 
> instr N
> ...
> endin
> 
> ...
> 
> score
> ...
> endscore


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2009-02-19 19:03
FromMichael Gogins
SubjectRe: [Cs-dev] CSD and XML
I invented the format, and that is exactly what I was thinking -- like
XML, tags can be ignored, but not as fussy or heavyweight as XML. I
did verify that some XML browsing programs would load CSDs as if they
were XML and show you the text. I don't know if that would still be
the case.

Regards,
Mikr

On Thu, Feb 19, 2009 at 1:26 PM, Anthony Kozar
 wrote:
> I don't know what the original rationale was but it is similar to the
> Cecilia document format.  I think there are advantages to the "XML-ish"
> format such as allowing ANY text outside of the recognized tags to be
> included without comment characters (thus allowing extensive documentation
> or program notes at the beginning of the file), and frontend programs can
> easily add their own tagged sections to a CSD and have them ignored by
> Csound and other frontends.
>
> Anthony Kozar
> mailing-lists-1001 AT anthonykozar DOT net
> http://anthonykozar.net/
>
> Jonatan Liljedahl wrote on 2/19/09 9:21 AM:
>
>> BTW, what was the reasoning when deciding for the XML-ish CSD format?
>> It's a bit odd to mix syntaxes in the same file like that... I'd rather
>> see something more in the line of csounds existing syntax:
>>
>> opts
>> ...
>> endopts
>>
>> instr N
>> ...
>> endin
>>
>> ...
>>
>> score
>> ...
>> endscore
>
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>



-- 
Michael Gogins
Irreducible Productions
Michael dot Gogins at gmail dot com

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2009-02-20 04:12
From"Dale Stewart"
SubjectRe: [Cs-dev] CSD and XML
I think a CDATA section can be added in such a way that it appears as
comments to the CSD parser, and renders the contents of the file acceptable
to both CSound and a standard XML parser.  The CDATA section begins on a
separate line, commented out as far as CSound is concerned, and the same for
the ending...

I played around with this at one time, but don't remember any more details
at the moment.

-----Original Message-----
From: Michael Gogins [mailto:michael.gogins@gmail.com] 
Sent: Thursday, February 19, 2009 1:04 PM
To: Developer discussions
Subject: Re: [Cs-dev] CSD and XML

I invented the format, and that is exactly what I was thinking -- like
XML, tags can be ignored, but not as fussy or heavyweight as XML. I
did verify that some XML browsing programs would load CSDs as if they
were XML and show you the text. I don't know if that would still be
the case.

Regards,
Mikr

On Thu, Feb 19, 2009 at 1:26 PM, Anthony Kozar
 wrote:
> I don't know what the original rationale was but it is similar to the
> Cecilia document format.  I think there are advantages to the "XML-ish"
> format such as allowing ANY text outside of the recognized tags to be
> included without comment characters (thus allowing extensive documentation
> or program notes at the beginning of the file), and frontend programs can
> easily add their own tagged sections to a CSD and have them ignored by
> Csound and other frontends.
>
> Anthony Kozar
> mailing-lists-1001 AT anthonykozar DOT net
> http://anthonykozar.net/
>
> Jonatan Liljedahl wrote on 2/19/09 9:21 AM:
>
>> BTW, what was the reasoning when deciding for the XML-ish CSD format?
>> It's a bit odd to mix syntaxes in the same file like that... I'd rather
>> see something more in the line of csounds existing syntax:
>>
>> opts
>> ...
>> endopts
>>
>> instr N
>> ...
>> endin
>>
>> ...
>>
>> score
>> ...
>> endscore
>
>
>
----------------------------------------------------------------------------
--
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco,
CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the
Enterprise
> -Strategies to boost innovation and cut costs with open source
participation
> -Receive a $600 discount off the registration fee with the source code:
SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>



-- 
Michael Gogins
Irreducible Productions
Michael dot Gogins at gmail dot com

----------------------------------------------------------------------------
--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net