cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

indexing and savetext problems

kmccain
3-Visitor

indexing and savetext problems

I am trying to create an alphanumerical (alpha before numeric - but I'll ask about that later!) index of part numbers and figure/index numbers. The structure of the parts data uses nested elements that look something like this:


DTD structure index results


<pl0> <figno><figindex><partno>... <figno> saved, but <figindex> and <partno> are lost
<pl1><figindex><partno>... </pl1> everything saves OK
<pl1><figindex><partno>... <figindex> and <partno> are lost
<pl2> <figindex><partno>...</pl2> everything saves OK
<pl1><figindex><partno>... </pl1> everything saves OK
</pl0>


The num-index.app savetext is at each <pl0>, <pl1>, etc. element.


<savetext textid="num-index.app" conrule="&lt;ixpt">,partno.txt,</ixpt>,<ixsub1>,figindex.txt,</ixsub1>,<ixpgstr>,pagenum,</ixpgstr>" placemnt="after" append="1">


The strings are declared as:


<stringdecl textid="partno.txt" literal="" hotlink="1"><stringdecl textid="figindex.txt" literal="" hotlink="1">


I use a savetext to capture the content of each <partno> and <figindex> in each level, but end up losing the content of that element where the next level moves down, I'm guessing, since the nesting element hasn't closed. Thus my gathered index is always incomplete since I'm never getting the top level assembly partno/figindex and I'm missing the partno/figindex when the next indenture level changes from <pl1> to <pl2> or <pl2> to <pl3>, etc.


How do I configure my savetexts to save the contents of each nested level's part and index info to my index? or is there some other way I should be looking at this?


Thanks, KM

2 REPLIES 2

Hi Kim,
You're close. The outer rows don't work because each nested row overwrites the strings for figindex and partno, and the savetexts to the appended string are placemnt=after. Using the example below, when the savetexts for pl1 and pl0 occur, the strings for figindex and partno are the values from the pl2 row.

<pl0><figno>...</figno><figindex>1</figindex><partno>111</partno>...<pl1><figindex>2</figindex><partno>222</partno>...<pl2><figindex><figindex>3</figindex><partno>333</partno>...</pl2>savetext to .app</pl1>savetext to .app</pl0>savetext to .app

The savetexts to the appended string need to be on the last element in each row.

<pl0><figno>...</figno><figindex>1</figindex><partno>111</partno>...<last-element>savetext to .app<pl1><figindex>2</figindex><partno>222</partno>...<last-element>savetext to .app<pl2><figindex><figindex>3</figindex><partno>333</partno>...<last-element>savetext to .app</pl2></pl1></pl0>

Good luck!
Suzanne Napoleonwww.FOSIexpert.com"WYSIWYG is last-century technology!"
kmccain
3-Visitor
(To:kmccain)

Suzanne,


Thanks for steering me in the right direction once again. I've got this working now and am getting all the part nos. and index numbers out of the IPL pages. Now I have to figure out how to get it sorted in the right order. I need to have all the alpha entries first and then the numeric ones, but Epic seems to do the opposite as the default. I am reading through your chapter on indexing and it sounds like I need to create a custom collation file to do this. Or is there some other way to change the sort order?


Thanks again, Kim

Top Tags