Article View: adobe.framemaker.sgml
Article #778FDK : element order, prop, ID?
From: alma
Date: Mon, 08 Sep 2008 09:36
Date: Mon, 08 Sep 2008 09:36
44 lines
1820 bytes
1820 bytes
Hello,
I need to develop an automate to get prop of an element before an action and to set it after the action.
Before an action, it will search all P elements of the document that are before B elements. P is Paragraph (pgf).
* Rbody --B
--P (this one will not be good)
* Rbody --P (this one will be good)
--B
So, i want to get all the ID and prop of P elements that are before B elements.
I have tried a lot of things like go from P to P and on each P find the next sibling element and check if it's B element :
//fdk guide code + custom
F_ObjHandleT docId, pgfId, nsibId;
StringT b;
b=F_StrCopyString((StringT)"B");
docId = F_ApiGetId(0, FV_SessionId, FP_ActiveDoc);
pgfId = F_ApiGetId(FV_SessionId, docId, FP_FirstPgfInDoc);
while (pgfId)
{
nsibId = F_ApiGetId(docId, pgfId, FP_NextSiblingElement)
if(F_StrCmpN(F_ApiGetString(docId, nsibId , FP_Name), b, F_StrLen(b)==0)
{
F_Printf(NULL, "I'M VERY HAPPY\n");
}
pgfId = F_ApiGetId(docId, pgfId, FP_NextPgfInDoc);
}
it doesn't work, nsibId is 0.
it seems that i need to make a selection of the text but i'm not sure...
don't well understand the logic to navigate through a document.
Do you know how to make this?
Thank you,
Alexandre
Technical Details
Message-ID:
<59b66b9f.-1@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!feeder.erje.net!news.svengo.de!news4us.nl!webcrossingShow Full Headers
Complete Article Headers
X-Google-Thread: fcc08,bc4bd278672bc8a7,start X-Google-Attributes: gidfcc08,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: alma@adobeforums.com Newsgroups: adobe.framemaker.sgml Subject: FDK : element order, prop, ID? Message-ID: <59b66b9f.-1@webcrossing.la2eafNXanI> Date: Mon, 8 Sep 2008 02:36:45 -0700 Lines: 51 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!feeder.erje.net!news.svengo.de!news4us.nl!webcrossing