Applying variables to replace text
Posted: Tue Jan 10, 2006 1:15 am
Hello!
I have an interesting challenge (well, both interesting and challenging to me, at any rate):
I have a several documents that reference a master file through the use of xinclude statements. What I would like to have the master file contain a variable that represents an element, and have the referencing document replace that variable with a more relevant term.
I've done something similar before, where I had:
<[!Entity objectName "widget"]>
And in the body of the file:
You need to use &objectName; to get the job done.
When I transform a document like this, any instance of &objectName; is replaced with "widget." Unfortunately, this doesn't seem to work when I have xincludes.
Anyone have any suggestions on the best way to acheive this? Thanks!
I have an interesting challenge (well, both interesting and challenging to me, at any rate):
I have a several documents that reference a master file through the use of xinclude statements. What I would like to have the master file contain a variable that represents an element, and have the referencing document replace that variable with a more relevant term.
I've done something similar before, where I had:
<[!Entity objectName "widget"]>
And in the body of the file:
You need to use &objectName; to get the job done.
When I transform a document like this, any instance of &objectName; is replaced with "widget." Unfortunately, this doesn't seem to work when I have xincludes.
Anyone have any suggestions on the best way to acheive this? Thanks!