Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No handling of namespaces #135

Closed
beberlei opened this issue Jun 22, 2012 · 14 comments
Closed

No handling of namespaces #135

beberlei opened this issue Jun 22, 2012 · 14 comments

Comments

@beberlei
Copy link

Its not possible to use this bundle, if you want to add namespaces to the different results.

@schmittjoh
Copy link
Owner

XML namespaces?

@beberlei
Copy link
Author

yes sorry,misleading:)

@schmittjoh
Copy link
Owner

What kind of namespace handling do you need? I intentionally left this out because I thought nobody needs it :)

@beberlei
Copy link
Author

I want a single xmlns to be added to the root element. So probably @xmlRoot(namespace="...") - or generically namespace on any xml attribute to overwrite the global setting, but thats very specific already.

@stephpy
Copy link

stephpy commented Jul 13, 2012

I'm on the same usecase :)

@stephpy
Copy link

stephpy commented Jul 13, 2012

In fact, We can use SerializedName

@adrienbrault
Copy link
Contributor

Does this seems easy/doable ?

A single namespace could be set on each object.

/** @Serializer\XmlRoot("user", namespace = "http://example.com", namespace-prefix = "ex")
class User {
   public $category;
}

/** @Serializer\XmlRoot("category", namespace = "http://test.com", namespace-prefix = "test")
class Category {
}

would produce:

<user xmlns="http://example.com" xmlns:test="">
  <test:category/>
</user>

@stephpy
Copy link

stephpy commented Aug 16, 2012

Why do not use serializedName ?

@stephpy
Copy link

stephpy commented Aug 16, 2012

You can add all these things by using xmlAttribute and serializedName

@armetiz
Copy link
Contributor

armetiz commented Sep 19, 2012

I'm interested to be able to map :

<foo:bar> to $fooBar property
<bar> to $bar property.

@marijn
Copy link

marijn commented Nov 6, 2012

👍

In our case some of the object data is metadata which should be mapped to a metadata namespace.

@ajgarlag
Copy link

ajgarlag commented Mar 8, 2013

You can review my pull request for this feature in schmittjoh/serializer#58

@jeserkin
Copy link

Was there any conclusion reached?

@schmittjoh
Copy link
Owner

We are not there yet, but @ajgarlag's pull request brings us pretty close. I'll close this, you find the latest progress on schmittjoh/serializer#58.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants