Open ronaldtse opened 1 month ago
@ronaldtse Currently, we can use the raw
tag for this by adding it to each attribute we define, like attribute:remarks, raw: true
, but for the current implementation, we will have to define raw: true
everywhere.
We can have something like as discussed here https://github.com/lutaml/lutaml-model/issues/57#issuecomment-2379211692, or we can provide raw: true
at root level for an attribute like
class Remark < Lutaml::Model::Serializeable
attribute :raw_content
xml do
root "remarks", raw: true
map_content to: :raw_content
end
end
@ronaldtse What do you suggest?
@HassanAkbar now that #129 is merged, do we still need this ticket? Thanks.
@ronaldtse I think this is no longer needed as we have both the raw
tag and map_all
.
We've just come across an example of embedding raw HTML inside XML.
The NIST OSCAL Metaschema allows embedding HTML inside XML as documentation.
This is the exact use case for using the
raw
option for an attribute.From:
@HassanAkbar can we confirm that this use case is supported by
raw
? Thanks!