can ENTITY ImportedGraphic - be omitted?

2006-08-24 Thread eric.d...@ca.transport.bombardier.com
Sorry if this isn't relevant. It has been a while since I was in the 
depths of structured documents, DTDs, EDDs, R/W, and the like.

One thing that stumped me for a while was the creation of entities for 
graphics when they shouldn't have been. Turns out that if the userstring 
property (which was being set by a script as a means of tracking) is set 
to any value, FM creates an entity based on the value.

Had to add a script to my workflow that eliminated all userstring values 
from all graphics/graphic elements.

Eric L. Dunn
Senior Technical Writer

___
 

This e-mail communication (and any attachment/s) may contain confidential 
or privileged information and is intended only for the individual(s) or 
entity named above and to others who have been specifically authorized to 
receive it. If you are not the intended recipient, please do not read, 
copy, use or disclose the contents of this communication to others. Please 
notify the sender that you have received this e-mail in error by reply 
e-mail, and delete the e-mail subsequently. Please note that in order to 
protect the security of our information systems an AntiSPAM solution is in 
use and will browse through incoming emails. 
Thank you. 
_
 


Ce message (ainsi que le(s) fichier/s), transmis par courriel, peut 
contenir des renseignements confidentiels ou prot?g?s et est destin? ? 
l?usage exclusif du destinataire ci-dessus. Toute autre personne est par 
les pr?sentes avis?e qu?il est strictement interdit de le diffuser, le 
distribuer ou le reproduire. Si vous l?avez re?u par inadvertance, 
veuillez nous en aviser et d?truire ce message. Veuillez prendre note 
qu'une solution antipollupostage (AntiSPAM) est utilis?e afin d'assurer la 
s?curit? de nos systems d'information et qu'elle fur?tera les courriels 
entrant.
Merci. 
_
 





RE: can ENTITY ImportedGraphic - be omitted?

2006-08-17 Thread Wim Hooghwinkel \(Scriptware\)
Hello Lynn,

thanks you for your quick response. Your suggestion to use 'the function
unparsed-entity-uri' works, thanks!

I can not get the corrcet syntax for FM to export only as file, not as
entity. It keeps on exporting it as an entity, even when I delete the
entity reference page and use the 'attribute entity is fm attribute'
rule (FM won't import graphics that are declared by entitys though).


Met vriendelijke groet / kind regards,

Wim Hooghwinkel [EMAIL PROTECTED]
DTP and XML Management

Scriptware bv http://www.scriptware.nl
tel : +31 (0)23 548 48 84
fax : +31 (0)23 548 48 85
http://www.scriptware.nl
[EMAIL PROTECTED] [EMAIL PROTECTED] 

-Original Message-
From: Lynne A. Price [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 17, 2006 3:31 PM
To: Wim Hooghwinkel (Scriptware); Frame 
Subject: Re: can ENTITY ImportedGraphic - be omitted?

At 05:45 AM 8/17/2006, Wim Hooghwinkel \(Scriptware\) wrote:
when FM saves an XML file, it writes the graphics as entitys in the 
header of the XML.

Can this be changed - to keep the graphic references in the XML body?

Problem is, that we want to use some XSLT to preprocess or postprocess 
the XML files and it seems to be impossible to keep the header with the

entity references. Has anyone yet a work around for this?  (FM 7.2).

Wim,

1) FM can export a graphic using either an ENTITY attribute (default
name is entity) or a CDATA attribute (default name is file). The value
of the former is the name of an unparsed entity whose system identifier
names the graphic file; the value of the latter is the name of the
graphic file. If the DTD declares both attributes, FM uses the ENTITY
attribute.

You can specify the attribute names with read/write rules such as:

 element image {
is fm graphic element;
attribute graphicfile is fm property file;
attribute graphicentity is fm property entity;
}

These rules allow FM to import files that use either graphicfile or
graphicentity, but on export it would always use graphicentity.  If you
want it to export only graphicfile, remove the rule for graphicentity.
If you want to export using graphicfile, but to be able to import either
form, you'll need to use different rules for opening XML documents and
saving documents as XML.

If your DTD happens to declare an ENTITY attribute named entity and you
don't want FM to use it for exporting graphics, use the rule:

 attribute entity is fm attribute;

2) While XSLT cannot simply copy the internal DTD subset of the document
it is processing, it can generate a new one with entity declarations
equivalent to those in the original. Use the function
unparsed-entity-uri to write such a transform.

 --Lynne


Lynne A. Price
Text Structure Consulting, Inc.
Specializing in structured FrameMaker consulting, application
development, and training
[EMAIL PROTECTED]http://www.txstruct.com
voice/fax: (510) 583-1505  cell phone: (510) 421-2284 


___


You are currently subscribed to Framers as [EMAIL PROTECTED]

Send list messages to [EMAIL PROTECTED]

To unsubscribe send a blank email to
[EMAIL PROTECTED]
or visit 
http://lists.frameusers.com/mailman/options/framers/archive%40mail-archive.com

Send administrative questions to [EMAIL PROTECTED] Visit
http://www.frameusers.com/ for more resources and info.


RE: can ENTITY ImportedGraphic - be omitted?

2006-08-17 Thread Lynne A. Price

At 08:28 AM 8/17/2006, Wim Hooghwinkel \(Scriptware\) wrote:

I can not get the corrcet syntax for FM to export only as file, not as
entity. It keeps on exporting it as an entity, even when I delete the
entity reference page and use the 'attribute entity is fm attribute'
rule (FM won't import graphics that are declared by entitys though).


Wim,
  If you need to import graphics specified with entities, then you are 
better off using XSLT. As far as the export issue, try making the attribute 
rule a subrule of the rules for the graphic element:


   element graphic {
  is fm graphic element;
  attribute entity is fm attribute;
  }

--Lynne


Lynne A. Price
Text Structure Consulting, Inc.
Specializing in structured FrameMaker consulting, application development, 
and training

[EMAIL PROTECTED]http://www.txstruct.com
voice/fax: (510) 583-1505  cell phone: (510) 421-2284 



___


You are currently subscribed to Framers as [EMAIL PROTECTED]

Send list messages to [EMAIL PROTECTED]

To unsubscribe send a blank email to 
[EMAIL PROTECTED]

or visit 
http://lists.frameusers.com/mailman/options/framers/archive%40mail-archive.com

Send administrative questions to [EMAIL PROTECTED] Visit
http://www.frameusers.com/ for more resources and info.


can ENTITY ImportedGraphic - be omitted?

2006-08-17 Thread Wim Hooghwinkel (Scriptware)
Hello,

when FM saves an XML file, it writes the graphics as entitys in the
header of the XML.

Can this be changed - to keep the graphic references in the XML body? 

Problem is, that we want to use some XSLT to preprocess or postprocess
the XML files and it seems to be impossible to keep the header with the
entity references. Has anyone yet a work around for this?  (FM 7.2).

thanks,


Met vriendelijke groet/Kind regards,
Wim Hooghwinkel 
Wim Hooghwinkel
DTP and XML Manager T: +31 (0)23 548 48 84



can ENTITY ImportedGraphic - be omitted?

2006-08-17 Thread Lynne A. Price
At 05:45 AM 8/17/2006, Wim Hooghwinkel \(Scriptware\) wrote:
>when FM saves an XML file, it writes the graphics as entitys in the
>header of the XML.
>
>Can this be changed - to keep the graphic references in the XML body?
>
>Problem is, that we want to use some XSLT to preprocess or postprocess
>the XML files and it seems to be impossible to keep the header with the
>entity references. Has anyone yet a work around for this?  (FM 7.2).

Wim,

1) FM can export a graphic using either an ENTITY attribute (default name 
is entity) or a CDATA attribute (default name is file). The value of the 
former is the name of an unparsed entity whose system identifier names the 
graphic file; the value of the latter is the name of the graphic file. If 
the DTD declares both attributes, FM uses the ENTITY attribute.

You can specify the attribute names with read/write rules such as:

 element "image" {
is fm graphic element;
attribute "graphicfile" is fm property file;
attribute "graphicentity" is fm property entity;
}

These rules allow FM to import files that use either graphicfile or 
graphicentity, but on export it would always use graphicentity.  If you 
want it to export only graphicfile, remove the rule for graphicentity. If 
you want to export using graphicfile, but to be able to import either form, 
you'll need to use different rules for opening XML documents and saving 
documents as XML.

If your DTD happens to declare an ENTITY attribute named entity and you 
don't want FM to use it for exporting graphics, use the rule:

 attribute "entity" is fm attribute;

2) While XSLT cannot simply copy the internal DTD subset of the document it 
is processing, it can generate a new one with entity declarations 
equivalent to those in the original. Use the function unparsed-entity-uri 
to write such a transform.

 --Lynne


Lynne A. Price
Text Structure Consulting, Inc.
Specializing in structured FrameMaker consulting, application development, 
and training
lprice at txstruct.comhttp://www.txstruct.com
voice/fax: (510) 583-1505  cell phone: (510) 421-2284 





can ENTITY ImportedGraphic - be omitted?

2006-08-17 Thread Wim Hooghwinkel (Scriptware)
Hello Lynn,

thanks you for your quick response. Your suggestion to use 'the function
unparsed-entity-uri' works, thanks!

I can not get the corrcet syntax for FM to export only as file, not as
entity. It keeps on exporting it as an entity, even when I delete the
entity reference page and use the 'attribute "entity" is fm attribute'
rule (FM won't import graphics that are declared by entitys though).


Met vriendelijke groet / kind regards,

Wim Hooghwinkel wimh at scriptware.nl
DTP and XML Management

Scriptware bv http://www.scriptware.nl
tel : +31 (0)23 548 48 84
fax : +31 (0)23 548 48 85
http://www.scriptware.nl
info at scriptware.nl info at scriptware.nl 

-Original Message-
From: Lynne A. Price [mailto:lpr...@txstruct.com] 
Sent: Thursday, August 17, 2006 3:31 PM
To: Wim Hooghwinkel (Scriptware); Frame 
Subject: Re: can ENTITY ImportedGraphic - be omitted?

At 05:45 AM 8/17/2006, Wim Hooghwinkel \(Scriptware\) wrote:
>when FM saves an XML file, it writes the graphics as entitys in the 
>header of the XML.
>
>Can this be changed - to keep the graphic references in the XML body?
>
>Problem is, that we want to use some XSLT to preprocess or postprocess 
>the XML files and it seems to be impossible to keep the header with the

>entity references. Has anyone yet a work around for this?  (FM 7.2).

Wim,

1) FM can export a graphic using either an ENTITY attribute (default
name is entity) or a CDATA attribute (default name is file). The value
of the former is the name of an unparsed entity whose system identifier
names the graphic file; the value of the latter is the name of the
graphic file. If the DTD declares both attributes, FM uses the ENTITY
attribute.

You can specify the attribute names with read/write rules such as:

 element "image" {
is fm graphic element;
attribute "graphicfile" is fm property file;
attribute "graphicentity" is fm property entity;
}

These rules allow FM to import files that use either graphicfile or
graphicentity, but on export it would always use graphicentity.  If you
want it to export only graphicfile, remove the rule for graphicentity.
If you want to export using graphicfile, but to be able to import either
form, you'll need to use different rules for opening XML documents and
saving documents as XML.

If your DTD happens to declare an ENTITY attribute named entity and you
don't want FM to use it for exporting graphics, use the rule:

 attribute "entity" is fm attribute;

2) While XSLT cannot simply copy the internal DTD subset of the document
it is processing, it can generate a new one with entity declarations
equivalent to those in the original. Use the function
unparsed-entity-uri to write such a transform.

 --Lynne


Lynne A. Price
Text Structure Consulting, Inc.
Specializing in structured FrameMaker consulting, application
development, and training
lprice at txstruct.comhttp://www.txstruct.com
voice/fax: (510) 583-1505  cell phone: (510) 421-2284 





can ENTITY ImportedGraphic - be omitted?

2006-08-17 Thread Lynne A. Price
At 08:28 AM 8/17/2006, Wim Hooghwinkel \(Scriptware\) wrote:
>I can not get the corrcet syntax for FM to export only as file, not as
>entity. It keeps on exporting it as an entity, even when I delete the
>entity reference page and use the 'attribute "entity" is fm attribute'
>rule (FM won't import graphics that are declared by entitys though).

Wim,
   If you need to import graphics specified with entities, then you are 
better off using XSLT. As far as the export issue, try making the attribute 
rule a subrule of the rules for the graphic element:

element "graphic" {
   is fm graphic element;
   attribute "entity" is fm attribute;
   }

 --Lynne


Lynne A. Price
Text Structure Consulting, Inc.
Specializing in structured FrameMaker consulting, application development, 
and training
lprice at txstruct.comhttp://www.txstruct.com
voice/fax: (510) 583-1505  cell phone: (510) 421-2284