-
Notifications
You must be signed in to change notification settings - Fork 34
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
XML Attributes and Element values #379
Comments
Probably the same underlying issue as #336 (part 2). XML attributes are decoded into literals, so they can't be distinguished from actual elements downstream. The XML decoder and encoder would have to agree on a way to preserve this information (similar to what JSON decoder and encoder do for array fields). Maybe |
The usual convention is that the value in between the two tags of an XML-field is always transformed in the literal named The two problems here are:
->
Some transformation changes the ->
The encoder then should be able to transform to:
|
Yes, I guess this implicit attribute handling should be possible as well: Treat all literals as attributes, except those named But |
This also mainly (only?) applies to streams produced by |
Reopened and assigned @TobiasNx for functional review. |
Also there seems to be an sever (?)API break with the new handling of attributes and values if not setting any option at all!!! TobiasNx/notWorkingFlux@9fdffea?branch=9fdffea8fdc4dc7a8bc23ec4d8843690d978d33e&diff=split Shouldn't be the default settings stay the same. My initial request that there needs to be documentation about the handling of xml in metafacture and that it decodes/handles them as "fields" is still needed. Also I did not see documentation on the |
This sets the default value tag in the encoder to its former behaviour. Reverts one change from: d6e68ff
Pascal and I teamed up and fixed this: |
Closed with #406 |
As the example in #377 (comment) also shows attributes and elements of XML are all reconstructed as subfields. There is no documentation on this. Also if again encoded in XML the "new" structure is kept and the attributes are only kept as subfields.
This specific handling of xml should be documented.
Also:
Is there any way to reconstruct this correctly or at least build XML with attributes in metafacture?
In:
FLUX
[Same if you use a morph with _elseNested]
Out:
The text was updated successfully, but these errors were encountered: