Yes, it would be. The tags clearly should be preserved. The spec has some explicit definitions of what part of the data model is preserved at each ("logical") steps - specifically, see section 3.2.1.

Have fun,

    Oren Ben-Kiki


On Mon, Nov 26, 2012 at 12:33 PM, Peter Murphy <peterkmurphy@gmail.com> wrote:
On Mon, Nov 26, 2012 at 10:07 AM, Trans <transfire@gmail.com> wrote:
> Is the google-group mirror still broken? Did any one else receive this post?
> I have replicated below:
>

Good day, Trans. How are things?

> I was thinking that it would be a very a good idea to create an offical YAML
> Implementation Guide, which could serve as a set of guidelines for
> implementation developers. I am not qualified to write such a document
> myself, so I can probably only help with surface level details, e.g. proof
> reading, etc. But I think it is important. So I want to try to find a way to
> encourage those who are qualified to work on it. Of all the people I know I
> imagine Oren and Kirill Simonov (the creator of libYAML) might be the best
> qualified. What can I do to help this happen?
>

I have been paying attention to the list, but I have been busy - work,
Master's degree, and a few other things. More over, I have been loathe
to reply, because I am more than one year overdue to get the YPath
spec out. I should get on to it.

> Also, let me explain how I came to this quest. I use YAML almost exclusively
> via Ruby. And Ruby's implementation, Psych, which is build on top of
> libYAML, lacks what I consider an important feature for any "LAMP" language
> implementation. Namely, it loads arbitrary types without error but provides
> no way to access the type tag. e.g.
>
>     YAML.load <<-HERE
>       --- !foo
>       a: 1
>       b: 2
>     HERE
>
> This returns a regular old Hash `{'a'=>1, 'b'=>2}`, without anyway of
> finding out it is a `!foo`. I have run into use cases that this limitation
> makes unworkable, and it strikes me as serious flaw in that it necessarily
> requires pre-knowledge of all types that might be loaded. When I approached
> the developer of Psych with this, he basically dismissed my concern out of
> hand saying he saw no use for it. But I know it really is a serious failing.
> That's when I realized that there was no implementation standards of any
> kind, and implementors really had nothing to guide them in what was
> important for API's to provide (relative, or course, to a given language's
> capabilities). Implementors can choose to buck such guidelines, but at least
> by having them they would have some point of reference about what an
> official API should generally handle.
>
> -Trans
>

Trans,

As far as I understand it, the YAML spec says:

http://www.yaml.org/spec/1.2/spec.html#Processing

"A YAML processor need not expose the serialization or representation
stages. It may translate directly between native data structures and a
character stream (dump and load in the diagram above). However, such a
direct translation should take place so that the native data
structures are constructed only from information available in the
representation. In particular, mapping key order, comments, and tag
handles should not be referenced during composition."

The problem is that it sounds that the implementer has "erased" all
tags en route so that (I guess) everything object-like becomes a map.
Would that be a violation of the spec?

Best regards.
Peter Murphy


--
Email: peterkmurphy@gmail.com
WWW: http://www.pkmurphy.com.au/

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Yaml-core mailing list
Yaml-core@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/yaml-core