[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: element markup in attributes
This looks very like the practice of using processing instructions to show tracked changes, specifically deletions where the deleted info (text and/or elements) is encoded in the PI data, for example: <?oxy_delete author="deltaxml" timestamp="20100217T122251+0000" content="<p class='- topic/p'>This paragraph appears only in Version 1 and not in Version 2. </p>"?> There is a justification here that the deleted text does not appear in the document and so the document can be validated OK. But in general it is not good practice because it will fail at some point - for example namespace handling. The multiple encoding of &amp; in your example also shows that it not nice. I'd say that introducing such a mechanism is bad practice unless there is literally no other way to achieve it. We have encoded attributes (name and value) in attributes for our deltas but again that runs into problems eventually so we moved away from it and put it back into markup, i.e. elements. Robin Simon St.Laurent wrote: > I hesitate a bit in raising questions about HTML5 here, mostly because > of concerns that the violence of that conversation will enter the > discussion here. Nonetheless, this list is the best place I know of > to discuss markup best practices, and seems like the right place to > ask the question. > > The iframe element has always been a tricky critter, but in HTML5 it's > picked up a srcdoc attribute which "gives the content of the page that > the nested browsing context is to contain." This allows the > construction of short documents in an iframe context without requiring > a separate HTTP request through the src attribute. > > Details can be found here: > > <http://dev.w3.org/html5/spec-author-view/the-iframe-element.html> > <http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html> > > > So what does this look like? Here are three examples from those specs. > > ----------------------------------- > <iframe seamless sandbox="allow-same-origin" srcdoc="<p>did you get a > cover picture yet?"></iframe> > > <iframe seamless sandbox="allow-same-origin" srcdoc="<p>Yeah, you can > see it <a href="/gallery?mode=cover&amp;page=1">in my > gallery</a>."></iframe> > > <iframe seamless sandbox="allow-same-origin" srcdoc="<p>hey that's > earl's table. > <p>you should get earl&amp;me on the next cover."></iframe> > ----------------------------------- > > What do folks think? Is this reasonable, given the use case, or is > this pushing too hard on attributes and escaping? > > I wonder if just letting iframe have child content would make more > sense, but I suspect that raises more compatibility problems with > older browsers. > > Thanks, -- -- ----------------------------------------------------------------- Robin La Fontaine, Director, DeltaXML Ltd "Change control for XML" T: +44 1684 592 144 E: robin.lafontaine@deltaxml.com http://www.deltaxml.com Registered in England 02528681 Reg. Office: Monsell House, WR8 0QN, UK
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] |
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|