[Date Prev][Date Next] [Thread Prev][Thread Next]
[Date Index] [Thread Index] [New search]

Implied value rule



I did some testing in response to a question Sue Mitchell
asked yesterday. I have found that FM 7.0 ignores the
implied value rule when importing XML documents; it processes
it correctly importing SGML documents.

In particular, I used the following r/w rules:

element "graphic"
{
  is fm graphic element;
  attribute "dpi"
  {
    is fm property dpi;
    implied value is "96";
  }
  attribute "file" is fm property file;
}

to import the SGML document:

<!DOCTYPE doc [
<!ELEMENT doc - - (para | graphic)+>
<!ELEMENT para - - (#PCDATA)>
<!ELEMENT graphic - o EMPTY>
<!ATTLIST graphic 
   file CDATA #REQUIRED
   dpi  CDATA #IMPLIED
>
]>
<doc>
<graphic file="homework.tif">
</doc>


The graphic correctly imported at 96 dpi. I then
imported the XML equivalent:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE doc [
<!ELEMENT doc (para | graphic)+>
<!ELEMENT para (#PCDATA)>
<!ELEMENT graphic EMPTY>
<!ATTLIST graphic 
   file CDATA #REQUIRED
   dpi  CDATA #IMPLIED
>
]>
<doc>
<graphic file="homework.tif"/>
</doc>


The graphic erroneously imported at 300 dpi.

	--Lynne

Lynne A. Price
Text Structure Consulting, Inc.
Specializing in FrameMaker+SGML consulting and training
lprice@txstruct.com
http://www.txstruct.com
voice/fax: (510) 583-1505
cell phone: (510) 421-2284


** To unsubscribe, send a message to majordomo@omsys.com **
** with "unsubscribe framers" (no quotes) in the body.   **