> Okay. I see that my first patch was committed this morning (thanks
> DHH) so this is the next logical step. Note that by itself, this
> change enables nothing without a proper schema definition. Basically
> it would be trading a little bit of aesthetics (e.g., datetime for
> dateTime) for a little bit of purity (a "standard" type list).
Could you elaborate here a bit and list the changes needed to the
current AR::to_xml method to make it W3C compliant? This sounds like
a good idea, though I'm curious as to how heavy the aesthetics-
standards tradeoff will be.
> On the subject of XML schemas, the biggest missing piece of the puzzle
> is a way to get the appropriate attributes on the root element for
> records. I am thinking an interface would look something like
>
> @people.to_xml(
> :root_attributes => {
> 'xmlns:xsi' => "http://www.w3.org/2001/XMLSchema-instance",
> 'xsi:noNamespaceSchemaLocation' => formatted_people_url(:xsd)
> }
> )
Could this be even simpler? And, assuming the schema is at /people/
new.xml:
@people.to_xml(:format => :w3c, :schema => new_person_url(:format
=> :xml))
And maybe, to address Michael's concern, we could support both a
simple and a RelaxNG format for model schemas:
Person.to_xml(:format => :rng) # Relax NG format
Person.to_xml # Simpler, Railsy format
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---