This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 259 - TS Schema and/or transforms should prevent "null" from being used as a variable name
Summary: TS Schema and/or transforms should prevent "null" from being used as a variab...
Status: RESOLVED FIXED
Alias: None
Product: DOM TS
Classification: Unclassified
Component: Process (show other bugs)
Version: unspecified
Hardware: Other other
: P2 normal
Target Milestone: ---
Assignee: Curt Arnold
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-06-29 18:46 UTC by Curt Arnold
Modified: 2003-06-30 05:01 UTC (History)
0 users

See Also:


Attachments
Patch (64.20 KB, patch)
2003-06-30 01:00 UTC, Curt Arnold
Details

Description Curt Arnold 2003-06-29 18:46:37 UTC
In http://lists.w3.org/Archives/Public/www-dom-ts/2003Jun/0005.html

David Clover wrote:

Looking at CVS I see at least this one remains, in
namednodemapsetnameditemns10:

  <getNamedItemNS var="entity" obj="entities" namespaceURI="null"
  localName='"ent1"'/>
  ...same for notation...

Curt Arnold writes:

The transforms do not have any special interpretation for null and treat its use
in this fragment as a variable reference.  They do not attempt to diagnose use
of undeclared variables and leave that to the compiler, but in this case, the
resulting code is legal.  

The proper way is to define a variable and set the isNull attribute.  This null
is typed and should be much easier to handle in other language transforms.

<var name="nullNS" type="DOMString" isNull="true"/>
...
  <getNamedItemNS var="entity" obj="entities" namespaceURI="nullNS"
  localName='"ent1"'/>
  ...same for notation...
Comment 1 Curt Arnold 2003-06-30 01:00:59 UTC
Created attachment 39 [details]
Patch