Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

XSLT file maintenability

 
Alexandru Popescu
Ranch Hand
Posts: 995
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

I am working now on a project which implies lots and lots of xsl transformations. We have about 100-150 xslt files, and one of them are growing in length each day. In the last monthes I start wondering what will happen when the current developers will go away and we will have new colegues. How are they supposed to understand some XSLT of about 2000-3000 lines?

I start doing some XSLT refactoring and the feeling about this issue changed a little bit, but still i am asking myself if somebody discovered a more generic maintenability techinic.

10x in advance
 
Zhongwu Lin
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do you specify href in <xsl:include href="" />?

let's say I have two xsl files

com/test/main.xsl
com/test/second.xsl

and we want to include second.xsl in main.xsl

In main.xsl I do:

<xsl:include href="second.xsl" />
or
<xsl:include href="com/test/second.xsl" />

IN neither way the transformer see it.
 
Alexandru Popescu
Ranch Hand
Posts: 995
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It depends of the location of the file. Consider that the href attribute value must be a valid URL. For example <xsl:include href="file:./anotherXSL.xsl"/>.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic