[
Lists Home |
Date Index |
Thread Index
]
> Can you elaborate a bit more about this? What are the problems
> that you are referring to? Also, I dont understand how PI's can reduce
> portability. It seems to me that PI's are intended to achieve the
> opposite effect : if additional knowledge (than is visible to a basic
> XML processor) is visible to an XML application specific processor,
> then the PI serves as a signal to activate the application level
> processor. This doesnt change any the semantics of the data w.r.t.
> non-application specific data.
One of the fundamental problems that I see with XSD is that it is, at
its root, a type definition language, at least as I've come to
understand it. Now for many applications, this CAN be a very good
thing - web services being an obvious example - but in other cases,
such as in the case of documents, type is very much a secondary
consideration and can even end up proving to be a limiting factor in
terms of what kinds of documents can be created. DTDs of course lacked
all sense of type, and as a general purpose language doesn't work in
the data-centric world, but the task of creating sufficiently
open-ended XML in the document-centric world shows that perhaps one
can have too much of a good thing. I personally prefer Relax-NG in
this respect - it considers type itself to be simply another definable
property, with no intrinsic semantics associated with that type, and
sees type definition consequently as an application level property. Of
course, your mileage may vary.
As Michael Champion wrote superbly well in a follow-up to this, PIs
have a tendency to step on one another in the presence of multiple
applications that use the same XML. I think they also impose a non-XML
semantic that can interfere with applications - consider the simple
case of an XML document being processed that also has an
<?xml-stylesheet?> PI - does the processing occur before the
stylesheet is applied, after it, or is it ignored altogether in that
context? PIs essentially induce application specific logic that could
render the document in many different ways depending upon the degree
to which the parser recognizes the PIs at all. I don't think you can
get rid of PIs completely, but if you strongly discourage their use in
all but a very limited number of circumstances, you generally end up
with happier programs and happier programmers.
-- Kurt Cagle
|