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

is an element present in the document? also can be used w/DTD tricks to detect profiling

naglists
1-Newbie

is an element present in the document? also can be used w/DTD tricks to detect profiling

We no longer use this specific test anymore (we stopped supporting A4 so we
always know we're US Letter), but we used this in conjunction with
profiling to determine which page format to use.

I have always wanted a way to test the composition requests' profiling
directly from the stylesheet. It's not possible or at least it is far from
easy. What we do now is modify the DTD to permit things like:

<us_letter region="US"/">

where "region" is a profiling attribute. Now the following let's us do this
for US and that for A4.

We still use the same DTD/profiling trick against:
<version_1 release="version_1"/">
<version_2 release="version_2"/">
<version_3 release="version_3"/">

and other similar values. That said, because we modified the DTD and
currently constructed the document using "profiling elements" we don't need
to use a system-func for this anymore.

ANYhow, you can test for the presence of an element using:

function us_letter_exists(win,oid) {
local exists = "no";
if (oid_xpath_boolean($oid,'/descendant::us_letter')) {
exists = "yes";
}
return exists
}

<att>
<specval attname="my_fosi::us_letter_exists" attloc="system-func"&lt;br"/>attval="yes">
<charsubset>
<savetext textid="format-type.txt" conrule="\us\">
</charsubset>
</att>

--
Paul Nagai
0 REPLIES 0
Announcements

Top Tags