I've always "solved" these problems before by supporting an element (<version_2> and <version_3) here,=" for=" example)=" that=" would=" be=" appropriately<br="/>profiled by the author and presence testable by the FOSI.
Anyone solved such things another, more elegant way?
Hi Suzanne, It was great meeting you at PTC/User 2009. I hope you can make it again next year.
Yes, you're on the right path. I don't know how to write a system-func (or any ACL for that matter) that can tell what profiling has been submitted with a composition request. That's the feature request I wrote up, asking for some method of testing the composition profiling values submitted.
As far as I know, there is no way to do this now.
I have a solution that works if you have control of the DTD. Simply allow an EMPTY element at the beginning of any element's content model that might appear as a top level element in a chunk. Authors then include that element and profile it accordingly. FOSI defaults a text variable to NO and sets it to YES when/if that element is found. Then your specval tests that text variable.
Workable if you have time and, as I said before, control over the DTD. Maybe it could also be done with namespacing. Haven't pursued that at all.
The best solution to my thinking, though, is programmatic access to those composition-time profiling values.
On Sun, Aug 16, 2009 at 4:52 PM, Suzanne Napoleon < SuzanneNapoleon@fosiexpert.com> wrote:
> Paul, > > I'm not sure I understand exactly what you want to do. Am I on the right > track with the code below? The specval in tfoot might need to use a > system-func ... > > <e-i-c gi="tfoot" context="*" table"="> > <charlist inherit="1">...</charlist> > <att> > <specval attname="revision" attloc="tfoot" attval="version_1"> > <charsubset charsubsetref="SUPPRESS"></charsubset> > </att> > </e-i-c> > > <e-i-c gi="whatever"> > <charlist inherit="1"> > <usetext source="!<table><tgroup cols="1"><br />> <thead><row><entry>!,thhead.txt,!</entry></row></thead><br />> <tfoot<br />> revision="version_2;version_3"><row><entry>!,tfoot.txt,!</entry></row></tfoot><br />> <tbody><row><entry>!,tbody.txt,!</entry></row></tbody><br />> </tgroup></table>!"></usetext> > </charlist> > </e-i-c> > > Suzanne > "WYSIWYG is last-century technology!" > www.FOSIexpert.com
Have you examined the params array that is passed to the composer? That should contain an entry with the profiling specs. Look for an entry with the key 'profiles'. It will probably be some markup that you'll have to parse, but hopefully you can get what you need from that.
Thanks for the idea, Clay. I'll look into that. I think Brandon suggested the same or at least similar avenue (I haven't had a chance to pursue it) offline. It would be much nicer to solve this via ACL rather than elements/DTD mods, on the other hand, the DTD mods work. Now. Already. Maybe when I get some down time at the start of our fiscal year. Anyhow, when I figure out how to make one of these work (or get stuck trying), I'll let you all know.