|
Subject: Re: Allowed characters in element id's From: Chuck Darney <cdarney@xxxxxxxxxxxxxxxx> Date: Thu, 30 Apr 1998 11:57:04 -0400 |
I had a similar problem a little while ago. This was the response I
got. It did very well.
....Chuck Darney
Bill Raynor wrote:
>
> How do I determine what's allowed in an id= attribute? I'd like to use
> underscores and periods but jade gets upset about extraneous punctuation
> marks in the id. I'm generating the sgml from another system and would
> like to take give the elements an easy to read name.
>
> Is this something that can be changed, or is that not a wise thing to do?
> --
> At 12 Feb 1998 09:34 -0500, Chuck Darney wrote:
> Within my SGML instance I have several Text Entities referenced. In
the
> header I have an Entity:
>
> <!ENTITY QUOTE_EXPIRE_DT "June 25, 1997">
>
> Later in the instance I reference "QUOTE_EXPIRE_DT".
>
> The underscores are not valid characters in the entity name. Is this
a
> limitation with SGML or DSSSL? Is there a way around it? I'm passing
> these entity references from a Powerbuilder program and a SQL
database
> (which doesn't care for dashes).
It's controlled by your SGML Declaration, and, if you don't supply one
when you're parsing, an SGML system will infer one for you.
The specific portion of the SGML Declaration of interest here is the
"naming rules". Jade's default inferred SGML Declaration uses the
same naming rules as SGML's "Reference Concrete Syntax". To allow
underscores in entity names (and other SGML names), you need to supply
an SGML Declaration that includes the underscore character. Using the
DocBook SGML Declaration as an example, you need to add "_" to the
LCNMSTRT and UCNMSTRT parameters:
NAMING
LCNMSTRT "_"
UCNMSTRT "_"
LCNMCHAR ".-"
UCNMCHAR ".-"
NAMECASE
GENERAL YES
ENTITY NO
This will allow underscores anywhere in names, including as the first
character. You need to add it in two places because you are declaring
the uppercase and lowercase forms, which just happen to be the same.
You can reference your SGML Declaration by including it in the Jade
command line before the filename for your SGML file (or before your
DTD if also including the DTD filename in the command line). You can
also reference an SGML Declaration to infer by using the "SGMLDECL"
keyword in your catalog file. (See "charset.htm" from the nsgmls
distribution for more information on the catalog format.) However,
I'm not sure what would happen if you referenced an SGML Declaration
that used name characters and quantities, etc., that conflicted with
the requirements for processing the DSSSL stylesheet DTD.
Regards,
Tony Graham
=======================================================================
Tony Graham
Mulberry Technologies, Inc. Phone: 301-315-9632
17 West Jefferson Street, Suite 207 Fax: 301-315-8285
Rockville, MD USA 20850 email: tgraham@xxxxxxxxxxxxxxxx
=======================================================================
DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: Allowed characters in element i, Henry Thompson | Thread | Re: Allowed characters in element i, Tony Graham |
| Re: Allowed characters in element i, W. Eliot Kimber | Date | Re: Allowed characters in element i, Tony Graham |
| Month |