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

Re: Apply Default Attribute Values



We're mainly talking, I presume, about Choice-type
attributes (Name Token Groups in DTD parlance).

If such an attribute is declared to be "REQUIRED",
either the EDD, the DTD, or both MAY specify a default
value (i.e, one of the specified values in the
name-token group), in which case the absence of an
actual value is interpreted by both the EDD and the
DTD to mean the EDD/DTD-specified default value. In
this case, it would be WRONG fo export the default
value from FrameMaker, because different versions of
the same DTD could conceivably specify different
default values for the same attribute. Note also that,
in this case, if no default value is specified for a
REQUIRED attribute, an error will be reported during
validation or export.

The other case is that the attribute is NOT specified
in the DTD as REQUIRED, and the DTD may or may not
specify a default value. In that case, any default
value specified in the EDD for such an attribute
should NEVER be exported, because the absence of a
value in that situation should dictate what takes
place during XML/SGML processing of a FrameMaker
document instance. That is, the XML/SGML side of the
processing equation should determine what happens when
such an attribute has no value.


================================================ 
--- Rick Quatro <frameexpert@xxxxxxxxxxxx> wrote:
> I am not looking to change the attribute value from
> one thing to another. 
> Here is the scenario: when you set a default value
> for attribute in the EDD, 
> it will initially show in the structure view as
> italic. But if you 
> double-click on the attribute, the attribute will
> show as <no value> in the 
> Attribute window. And, from what I can tell, when
> you save the file as XML, 
> these default attribute values don't export. You
> have to explicitly set the 
> value in order for them to export. You can tell when
> an attribute value has 
> been set, because they no longer display as italic
> in the structure view.
> 
> After experimenting, I can use FrameScript to
> explicitly set these default 
> attribute values so that they export to XML.
> 
> But it does make me wonder: why have a "default"
> value for attributes when 
> it doesn't seem to "register" unless you explicitly
> set it?
> 
> Rick Quatro
> Carmen Publishing
> 585-659-8267
> www.frameexpert.com
> 
> > You can define a default value for an attribute,
> but as far as I know the 
> > process of importing an EDD won't change an
> attribute value from one thing 
> > to another. The "default" value is just the value
> of the attribute if it 
> > has no other value applied.
> >
> > I guess the question is, in the statement .. "set
> all attributes to 
> > default values when the EDD is imported" .. does
> "default" refer to the 
> > FrameMaker concept of default (empty), or do you
> mean "some actual default 
> > value" ?
> >
> > Unless I'm misunderstanding the original question,
> I think you'll have to 
> > go with the script, Rick.
> >
> > ...scott
> >
> > Scott Prentice
> > Leximation, Inc.
> > www.leximation.com
> > +1.415.485.1892
> 
> 
> ** To unsubscribe, send a message to
> majordomo@xxxxxxxxx **
> ** with "unsubscribe framers" (no quotes) in the
> body.   **
> 


Dan Emory & Associates
FrameMaker/FrameMaker+SGML Document Design & Database Publishing
DW Emory <danemory7224@xxxxxxxxxxxxx>

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