Thread View: adobe.framemaker.sgml
4 messages
4 total messages
Started by Van_Kurtz
Tue, 12 Aug 2008 20:28
UniqueID uniqueness within a book
Author: Van_Kurtz
Date: Tue, 12 Aug 2008 20:28
Date: Tue, 12 Aug 2008 20:28
16 lines
2520 bytes
2520 bytes
The Structure Guide states that one can create an element with an attribute of type UniqueID and allow the user to enter a value for the UniqueID attribute, as opposed to letting Frame do it on the fly. The Guide also states that within a book, the value of this UniqueID has to be unique. I am creating a rather generic file that will be used in several books. In each book, I want a cross-reference within the generic file to target a particular element in one of the files in the book; let this file be FileA. So, within FileA I have an element with its uniqueID attribute set to TheAttribute. THere is a cross-reference in the generic file that targets this element. Now, in another file FileB in another book, I have a similar element whose uniqueID attribute also has the value TheAttribute. So, if I update the book containing FileB and the generic file, the cross-reference in the generic file still targets the element in FileA, even though FileA is not part of the second book and is not open. Furthermore, if I put FileA and FileB and the generic file in the SAME book and update it, the cross-reference still targets the element in FileA, even though the book has two files each with an element containing the SAME value of the uniqueID; that is, in this case, the uniqueID is not really unique. So, what is going on? I am unable to do what the Structure Guide seems to imply that I can do. Is there something else I have to do? I have tried setting the Id reference attribute in the cross-reference to NOT read-only and then setting its value manually, but Frame makes me go through the cross-reference dialog box to set the value. Obviously, Frame is recording the file name along with the value of the uniqueID, but that all seems contrary what the Structure Guide states. I can get around this using conditional text but would like to avoid it. Thanks, Van
Re: UniqueID uniqueness within a book
Author: Rick_Quatro
Date: Tue, 12 Aug 2008 21:09
Date: Tue, 12 Aug 2008 21:09
6 lines
1579 bytes
1579 bytes
FrameMaker indeed stores the cross-reference source file for external cross-references. (In FrameScript, you can query the XRefFile property.) So if you have two cross-references that point to different files, but to the same attribute value, FrameMaker doesn't have any problem resolving the cross-references correctly. I don't know how this would work in the XML world, but if the book gets saved to a single XML file, the duplicate values may cause problems. One solution is to use FrameScript (or the FDK) to generate unique IDs for all UniqueID attributes in the book ahead of time. You can have a master "IDs.xml" file stored in the same folder as the script, so that the IDs are always unique, even across books. Whenever the script generates a new unique ID, it would check the master "IDs.xml" file to make sure it is unique. The new IDs are added to the "IDs.xml" file as they are generated so they are never reused. Rick Quatro rick at frameexpert dot com
Re: UniqueID uniqueness within a book
Author: Russ Ward
Date: Wed, 13 Aug 2008 03:08
Date: Wed, 13 Aug 2008 03:08
7 lines
1910 bytes
1910 bytes
Van, The guide is wrong, at least as far as working within structured Frame. A unique ID must be unique within a file, but not within a book. I think that statement has more to do with exporting a book as XML. Also, your observations are correct... Frame has two fundamental components involved with an xref link: 1) the target ID and 2) the target file. Therefore, an xref will always point to a specific file, regardless of how you shuffle files around in books, because it knows nothing about looking through a book. It only knows to look in the assigned file. I have a shareware plugin that might be of some help to you, the XRef Wizard. It's main purpose is to resolve xrefs by looking throughout a book for the ID target, rather than the single file that was originally targeted. Furthermore, it can do things like traverse a book and make all IDs unique, among other things. It's not my most complete work and hasn't really gotten a lot of use but I believe that it functions generally well. You can get a copy at www.weststreetconsulting.com. There aren't any sample files or a tutorial, so feel free to ask if something doesn't make sense. Russ
Re: UniqueID uniqueness within a book
Author: Van_Kurtz
Date: Wed, 13 Aug 2008 13:00
Date: Wed, 13 Aug 2008 13:00
10 lines
1604 bytes
1604 bytes
Rick and Russ, Thanks for your thoughts. I DO have an XSL stylesheet that creates a parts catalog from an input XML file. The XSL creates tables and figures with cross-references to them by simply writing the same value in the appropriate attributes (xref = uniqueID). Thus, the links are not established by Frame software but by the XSL. And it works just fine; however, all the links are within a given chapter, not across a book. So, I thought I could do the same thing within Frame, and I think I could, except for the fact that Frame requires me to use the cross-reference dialog box to enter the xref attribute, which process records the source file, which gives the results I do not want, as both of you concur. Right now I am handling the situation with conditional text. Russ, I will look at your product but doubt that I will get it because I like to keep things as simple as possible for other writers, who are sometimes brought in from the outside, as I am. Thanks again, Van
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads