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

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Start Counting from Attribute Value

SarahPrice
10-Marble

Start Counting from Attribute Value

Is it possible to take the value of an attribute and use thatset the initial value of a counter?If so can you point me in the right code direction??!!

Thanks in advance for your help.


Sarah Copley

4 REPLIES 4

I have never done this, but it seems like you ought to be able to use a FOSI <att> with a fillval that creates a setval attribute value on an <enumerate> element with a given enumid attribute vale.

Such as, assuming the attribute on your e-i-c is called "number":
<att>
<fillval attname="number" fillcat="enumerat" fillchar="setval">
<charsubset>
<enumerat enumid="[your" counter=" name=" goes=" here]&quot;=">
</att>

Like I said, I have never actually done this, but it seems like it should work.

Thanks for pointing me in the right direction. I got it to work by using this code:



<att>

<fillval attname="number" fillcat="enumerat" fillchar="increm">

<charsubset>

<enumerat enumid="step1.ct" setvalue="1">

</charsubset>

</att>





Sarah R. Copley




FWIW: We use a structure like this:
<att>
<specval attname="label" attval="#ANY">
<fillval attname="label" fillcat="savetext" fillchar="conrule">
<charsubset>
<savetext textid="chapternumber.txt">
</att>

chapternumber.txt is enumerated earlier in the e-i-c. This specval
overrides/resets/sets normal enumeration. In some documents, all chapters
have label set so chapters number properly outside of the document. On other
documents, no chapters have label set because they're only ever reviewed as
documents. You can't mix and match for long without stepping on your own
toes.

On lists (<att> not shown), this same strategy allows authors to manage
lists across otherwise-resetting boundaries. Like table rows. Don't ask.


On Wed, Apr 14, 2010 at 9:43 AM, Copley, Sarah CTR
<sarah.r.copley@uscg.mil>wrote:

> Thanks for pointing me in the right direction. I got it to work by using
> this code:
>
>
>
> <att>
>
> <fillval attname="number" fillcat="enumerat" fillchar="increm">
>
> <charsubset>
>
> <enumerat enumid="step1.ct" setvalue="1">
>
> </charsubset>
>
> </att>
>
>
>
>
>
> *Sarah R. Copley*
>
>
>
> *From:* - [mailto:-] *On
> Behalf Of *Benton, Ed L
> *Sent:* Wednesday, April 14, 2010 12:25 PM
>
> *To:* -
> *Subject:* [adepters] - RE: Start Counting from Attribute Value
>
>
>
> I have never done this, but it seems like you ought to be able to use a
> FOSI <att> with a fillval that creates a setval attribute value on an
> <enumerate> element with a given enumid attribute vale.
>
>
>
> Such as, assuming the attribute on your e-i-c is called “number”:
>
> <att>
>
> <fillval attname="number" fillcat="enumerat" fillchar="setval">
>
> <charsubset>
>
> <enumerat enumid="[your" counter=" name=" goes=" here]&quot;=">
>
> </att>
>
>
>
> Like I said, I have never actually done this, but it seems like it should
> work.
>
>
>
> *From:* Sarah Copley [mailto:sarah.r.copley@uscg.mil]
> *Sent:* Wednesday, April 14, 2010 11:53 AM
> *To:* -
> *Subject:* [adepters] - Start Counting from Attribute Value
>
>
>
> Is it possible to take the value of an attribute and use that set the
> initial value of a counter? If so can you point me in the right code
> direction??!!
>
> Thanks in advance for your help.
>
>
> *Sarah Copley*
>
>
>

Oh yeah, another limitation is that it is possible to confuse FOSI by
setting the label to "forty-seven" rather than 1, 2, 3, etc.

Announcements

Top Tags