I would imagine all these problems are to do with the bursting (or
chunking, or whatever you call it). If a PI appeared at a burst point,
in which CMS object would it live? If you are not bursting the XML to
create virtual/compound documents then the PI can simply be stored with
the rest of the XML in a single CMS object blob.
Bit of a bummer for the CMS vendors, but it's quite clear from the XML
spec that the intention of PIs is that they are ignored by all XML
processors (well, except the one they are meant for ;]).
-Gareth
Hintz, David L wrote:
> */Well, that's a good point. But, we're XyEnterprise Contenta users and
> their custom Perl scripts that "aid" in an Epic checkout go out of their
> way to remove certain Arbortext PIs (mainly Pub carets)./*
>
> */ /*
>
> */Dave/*
>
> */ /*
>
> *From:* Benton, Ed L [
> find it in the bad-place so as to preserve, as much as possible, the
> friendly behavior authors like.
>
> On Tue, Jul 7, 2009 at 3:20 PM, Brandon Ibach
> <brandon.ibach@single-sourcing.com <br="/>> <>">mailto:brandon.ibach@single-sourcing.com>> wrote:
>
> I suspect the problem is that the caret PI is *never* in the document,
> as far as the in-memory model. It's location is noted as the document
> is read and set as it is written, but it only ever exists on disk.
>
>
>
> I'm guessing the goal is to avoid the problems that can occur with
> downstream processing due to the caret PI popping up in unexpected or
> inconvenient locations. I know we had to fix up our publishing code at
> least a few times for this reason. So, if you've decided that
> maintaining the last cursor position across editing sessions is not
> important, why not use the save callback to just move the cursor to a
> location where you know the PI won't cause a problem? You could move
> the cursor back after the save is complete, either by calling the save
> command during the callback (making sure the callback doesn't go into a
> loop in the process) or by setting a timer to restore the cursor.
>
>
> -Brandon
>
>
>
> On Tue, Jul 7, 2009 at 3:40 PM, Steven Anderson
> <sanderson@salesforce.com <<a=" style="COLOR:" blue;=" text-decoration:=" underline"=" target="_BLANK" href="mailto:sanderson@salesforce.com">>">mailto:sanderson@salesforce.com>> wrote:
>
> Shouldn't the destroy callback be able to catch it, though? The file
> has been written before the destroy, but it appears that
> oid_find_children doesn't find it there, either.
>
>
>
> $retval2 = doc_add_callback(current_doc(), 'destroy', 'remove_pis')
>
> function remove_pis (doc) {
>
> oid_find_children(oid_null(), $nodeset2, "Caret");
>
> for ($i in $nodeset2) {
>
> response("Found a caret PI")
>
> }
>
> response("Got destroy. doc = " . doc )
>
> }
>
>
>
> *From:* Clay Helberg [
> *Sent:* Tuesday, July 07, 2009 12:29 PM
>
>
> *To:* - <
">mailto:->> *Subject:* [adepters] - RE: finding (and removing) AT processing
> instructions with ACL
>
>
>
> In that case, you might be stuck having to run a post-processor on the
> file after it's saved, either a quick-and-dirty Perl script or something
> more robust that parses the file and deletes the PI from the doc
> structure before resaving it.
>
>
>
> *From:* Paul Nagai [
> *Sent:* Tuesday, July 07, 2009 2:27 PM
> *To:* - <
">mailto:->> *Subject:* [adepters] - RE: finding (and removing) AT processing
> instructions with ACL
>
>
>
> Looking into the save callback event, it says that save is executed
> before the file is saved. I think this PI is written as part of the
> save, so, it doesn't exist then. I then tried the same thing based
> on the destroy event, but with the same lack of success.
>
> I hadn't considered when I last attempted this ... that the Pub Caret
> didn't exist at the time my code ran. I don't know why ... it's possible
> I was looking for it at other times, it's been a bit and I don't
> remember ... it's possible it just didn't occur to me. In any case, that
> is an interesting thought ... that it isn't handled differently, it is
> simply inserted after any hook/callback might find it.
>
>
> --
> Paul Nagai
>
>