How would I save the IDREF as described here? I need help with the ACL, which I know nothing. I've got xrefs in Styler 5.4 that aren't resolving and I was hoping to at least get the XREFID to show up as text, if not a link. Any advice would be appreciated!
The way to output IDREF attribute contents is to use ACL to copy the contents of the IDREF attribute into a pseudo-attribute, or available DTD attribute, which is not type IDREF. Then the FOSI can fillval from a non-IDREF attribute into a usetext source and output the literal text.
In Reply to Legacy User:
> > From: Suzanne Napoleon > Date: Mon, 16 Nov 1998 12:46:33 -0500 > Subject: Re: FOSIs - putting attribute values in gentext > > Matthew: > > It sounds like you want to output the contents of an attribute with type > IDREF, which isn't possible using fillval. You can fillval the contents of > an attribute of type ID into a usetext source or savetext conrule, but when > an IDREF attribute is fillval-ed into a usetext source, it is treated as a > textid to support cross referencing. It is not treated as literal text. If > the value of an IDREF attribute were treated as literal text, cross > referencing wouldn't work. > > The way to output IDREF attribute contents is to use ACL to copy the > contents of the IDREF attribute into a pseudo-attribute, or available DTD > attribute, which is not type IDREF. Then the FOSI can fillval from a > non-IDREF attribute into a usetext source and output the literal text. > > BTW: #CONTENT is not needed in the usetext source when fillval is used. > #CONTENT refers to element content, not attribute content. > > Please contact help@arbortext.com if you need more information on > pseudo-attributes. > > Best regards, > Suzanne Napoleon > Arbortext, Inc. In 8.0 you can use #CONTENT(attrname) with any attribute for this purpose. No is needed. Just put: in the e-i-c's charlist. --------------------------------------------- John Lloyd Arbortext Inc. jjl@arbortext.com 1000 Victor's Way +1 313.327.6066 Ann Arbor, Michigan 48108 USA
Hi Paul,
No, I haven't consulted with PTC. I am in a bit of a crunch, and I have some XREFs that work and some don't, even though they're all set up the same by using a target's ID. For example, I have a tag <sttecwp id="wp00300"> and later in the document the <xref xrefid="wp00300"> but there is no link back to <sttecwp>. XREFs to figures, tables and paragraphs are working.
So I thought if I could at least get the text (wp00300) if not a link to show up that was better than nothing for now.
Hi Paul,
No, it is not a FormalBlock, but the tables and figures are, which do work. Could it be? Thank you for the other tip as well. The "Insert Link" button in Editor works so I'm hoping that is acceptable.
In Reply to Paul Nagai:
is <sttecwp> a FormalBlock? I have this vague recollection that to complete
an ID/IDREF the target must be a FormalBlock.
On Tue, Jan 15, 2013 at 6:07 PM, Caroline Leccese <
@caroline@thecodesource.net> wrote:
> Hi Paul,
>
> No, I haven't consulted with PTC. I am in a bit of a crunch, and I have
> some XREFs that work and some don't, even though they're all set up the
> same by using a target's ID. For example, I have a tag <sttecwp<br/>> id="wp00300"> and later in the document the <xref xrefid="wp00300"> but
> there is no link back to <sttecwp>. XREFs to figures, tables and paragraphs
> are working.
>
> So I thought if I could at least get the text (wp00300) if not a link to
> show up that was better than nothing for now.
>
I was able to get the XREFs to work by tweaking the examples in the Styler help "Supporting automatic cross referencing"
The XREFs had to be manually created.
Anyway, I would like to format the link text from say, "wp00400" (the id attribute) to "WP 004 00"
I tried saving the id to a variable, xref-tbl.txt, and at least removing the wp
<savetext textid="Label_Number.xref"<br"/>conrule="!WP !,#XPATHSTRING(substring(xref-tbl.txt,3,3))#XPATH"
xrefidtag="wp"/>
thinking it would look like "WP 004" but all I got was "WP " in my link text.
So this is in the <wp> tag:
<att>
<fillval attname="id" fillcat="savetext" fillchar="conrule"/">
<charsubset>
<savetext textid="xref-tbl.txt"/"></charsubset>
</att>
<att>
Removing this line seemed to have no effect.
<charsubset>
<savetext textid="Label_Number.xref"<br"/>conrule="!WP !,#XPATHSTRING(substring(xref-tbl.txt,3,3))#XPATH"
xrefidtag="wp"/></charsubset>
</att>
I've checked xref-tbl.txt, the id is in there.
And this is in <xref>:
<att>
<specval attname="xrefid" attval="#ANY"/">
<charsubset>
<usetext source="#XREF(xrefid,Label_Number.xref)" placemnt="after">
</usetext>
</charsubset>
</att>
Hi Clay,
You are correct, I was confusing XPATH with FOSI variables. Your solution worked:
<savetext textid="Label_Number.xref"<br"/>conrule="!WP !,#XPATHSTRING(substring(@id,3,3))#XPATH,! !,#XPATHSTRING(substring(@id,6,2))#XPATH"
xrefidtag="wp"/>
Paul,
I am grateful for your code snippets, it was just what I was looking for to cut my teeth on ACL.
Thank you!