Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries [Thread Prev] >Thread Next - Re: Uses of processing instructions and notations Uses of processing instructions and notationsTo: NULL Date: 12/4/2008 7:46:00 PM Hi all, I can see from the XML spec what processing instructions and notations are, syntactically. I even just about understand how notations relate to external entities. But i don't understand what you'd actually use them for in practice! The one example i've found is using an xml-stylesheet PI to specify a stylesheet. Are there others? How about notations and external entities? Is the idea that they're a mechanism of linkage to external files that's more concrete than just using a URL? So, if i was writing a bizarro world HTML, i could specify images like this in the DTD: <!NOTATION jpeg SYSTEM "http://some-kind-of-URL"> <!NOTATION png SYSTEM "http://some-other-kind-of-URL"> <!ELEMENT img EMPTY> <!ATTLIST img src ENTITY alt CDATA #IMPLIED > Then in my document i could write: <!DOCTYPE img PUBLIC "-//Bizarro HTML" "http://bizarrohtml" [ <!ENTITY lena SYSTEM "lena.jpg" NDATA jpg> ]> <img src="lena" alt="picture of Lena"/> ? Can i also use that entity in regular text, like: <p>Here is a picture of Lena &lena;</p> ? And in both cases, what does it *mean*? If i parsed that into DOM and called getAttribute("src") on the img element, what would i get back? What's the point of being able to declare an attribute as being of type NOTATION? And does anyone actually use any of this stuff? tom -- I'm angry, but not Milk and Cheese angry. -- Mike Froggatt | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
