Re: [xsl] stylesheet organisation

Subject: Re: [xsl] stylesheet organisation
From: Alex Muir <alex.g.muir@xxxxxxxxx>
Date: Sun, 4 Sep 2011 09:59:25 +0000
Something I'm just wondering for the sake of learning more...

Had XSLT only defined an xsl:include in the spec and did not define an
xsl:import such that I assume it would force the authors to use
template priorities to establish precedence.

Would XSLT...

1. Be lot less powerful such that you could not implement something in
an xsl:import-less XSLT?

2. Be much more difficult to program certain things or perhaps just
less convenient?

3 Be something else....

---

I wonder if confusion arises from the words include and import not
really conveying much logical difference in functionality given that
no doubt studying these terms is a good idea before using them as I
did with MK's book.

---

Or better I suppose would just having a precedence attribute on the
xsl:include and no xsl:import in the language be able to convey and
implement the same functionality as currently exists such as
xsl:include precedence=" " with say the base stylesheet having
precedence="1" perhaps some other attribute would be needed as well to
get the right functionality?

I figure I'll learn something from your answers not suggesting to
change the spec although I would agree with someone who suggested that
perhaps it could be more clear.

I would rather code be more specific and write a bit more code than
there be rules like the ordering of the xsl:import giving different
precedence. I think it better the code specify the import precedence
with english given that would take only a little bit of code for the
extra clarity and we wouldn't be having this discussion I assume.

----

I suppose generally the things I don't like about xslt are the things
that happen as your learning that language but are not "clear" why
like when you get xmlns="" or some other namespace output on your
elements for the first time and your just thinking to yourself I don't
want that to happen. I didn't ask for that to happen. It's really not
clear to a new user and a bit annoying in my view. (hmmm sorry for the
"clarity" tangent but that is my one and only beef with xslt so it
came out... I just wish xslt output what I wrote exactly. It seems
much easier and more clear to add a namespace on my own than take it
away. I suppose this should be in a different post..)

Regards
-- 
Alex Muir
Instructor | Program Organizer - University Technology Student Work
Experience Building
University of the Gambia
http://sites.utg.edu.gm/alex/

Low budget software development benefiting development in the Gambia,
West Africa
Experience of a lifetime, come to Gambia and Join UTSWEB -
http://sites.utg.edu.gm/utsweb/

Current Thread