Skip to main content
Known Participant
July 13, 2009
Answered

FM8 create relative Path

  • July 13, 2009
  • 2 replies
  • 1660 views

Here is the read write rule I am using:

element "graphic"
{
is fm graphic element;
attribute "entity" drop;
attribute "boardno" is fm property file;

}

This is the output:

<graphic
    boardno = "file:///H:/My%20Documents/IMS/IMS%20CURRENT%20DEVELOPMENT/Frame%20Docs/graphics/ims_system.jpg"></graphic>

The output I wish is

<graphic boardno = "graphics/ims_system.jpg"></graphic>

Any Suggestions?

This topic has been closed for replies.
Correct answer Lynne A. Price

I do not round trip to XML, but I have experimented with it. My read/write rule is:

element "Graphic" {
    is fm graphic element;
    attribute "file" is fm property file;
}

The resulting attribute file in the element displays a relative path.

If you do not specify a read/write rule, then Frame creates entities in the XML and refers to them from within the element. Again, the paths listed in the entities are relative.

As with Russ, I have experimented only with single documents, no books.

Van


This is neither a read/write rule issue nor a book/document issue.

FM uses a relative path for a graphic when the XML document is being saved to the same drive as the graphic. It uses an absolute path otherwise.

2 replies

mjdeslonAuthor
Known Participant
July 15, 2009

So it is not possible to have framemaker use a relative path...that doesn't make sense to me...what if you have a document that is part a of deliverable...the path will not be the same on every pc...

Legend
July 15, 2009

Hi,

I'm a little confused here because I see relative path names saved as a default when I roundtrip XML. I don't use any read/write rules for the attribute, though, allowing it to simply default to "file," could that be causing a difference? Or could it be that I save documents individually, not as a book?

Russ

Van Kurtz
Inspiring
July 15, 2009

I do not round trip to XML, but I have experimented with it. My read/write rule is:

element "Graphic" {
    is fm graphic element;
    attribute "file" is fm property file;
}

The resulting attribute file in the element displays a relative path.

If you do not specify a read/write rule, then Frame creates entities in the XML and refers to them from within the element. Again, the paths listed in the entities are relative.

As with Russ, I have experimented only with single documents, no books.

Van

Inspiring
July 14, 2009

There is no read/write rule for making pathnames relative to a specified directory. You can use an XSLT post-process to strip the initial part of the pathname.

           --Lynne