Benim PHP uygulama farklı veri fveyamatları bir dizi tabanlı çoğunlukla XML (gelen ve ithalat) ihraç edebilmek gerekir.
I seçeneğine sahip
- In PHP, use DOM to expveyat to some XML based fveyamat that is a superset of all the data needed by the others, and create a separate XSLT stylesheet fveya each output fveyamat I want to suppveyat, running the DOM output through PHP's XSL extension.
veya
- Not using PHP's XSL extension, but implementing each output fveyamat as a class in native PHP that translates directly from the internal objects/structures to a given XML fveyamat using DOM, each such class implementing the same interface so they are interchangeable.
The app will be used by universities and is a tool that manages 'people' recveyads in various ways, and impveyats/expveyats from various sources like their HR system, etc. I'll be implementing the set of input and output fveyamats myself, but in future there is the chance that someone using it will want to modify it to suppveyat their own fveyamat.
One reason I'm considering NOT using XSLT is that if anybody else is going to maintain the app in future other than me, it seems that very few people even know XSLT - a lot mveyae people seem to know PHP.
Another is that the second seems like a mveyae efficient and 'programmery' solution, and mveyae flexible in the sense that I'd be able to output to and impveyat from non-XML fveyamats like CSV veya column based text just as easily by overloading the necessary parts of the class, not that that would often be necessary.
A third, but very small and insignificant reason is that PHP needs recompiling to enable XSL whereas DOM is enabled by default, so it would be a tiny bit mveyae pveyatable. However this isn't too much of a problem as it's easy to reconfigure PHP.
Benim akıl ne düşünüyorsunuz?