It's just stripping the namespace prefixes for back compatibility, that's the way the system originally worked way back in LPS v 1. There is an attribute of dataset called "nsprefix" which can be set to true to preserve namespace prefixes. I would like to set it to true by default, but have held off doing that just because there never seemed a good time to do it. But I'd be all for changing the default.
On 8/7/07, Chris Helgeson <[EMAIL PROTECTED]> wrote: > Henry, > > Just curious how we decided that the right behavior was to strip the > namespace identifiers? How do we handle the presence of e.g. geo:long and > precision:long in the same XML document? If we left the namespace > identifiers they could be disambiguated... > > > - Chris > > > On Aug 7, 2007, at 2:05 PM, Henry Minsky (JIRA) wrote: > > [ > http://www.openlaszlo.org/jira/browse/LPP-4401?page=all ] > > Henry Minsky resolved LPP-4401. > ------------------------------- > > Fixed in Change#: 5956 > Resolution: Fixed > > the fix implements the namespace prefix stripping in the lzXMLTranslator > package > for DHTML kernel. > > > > > Namespace separators are not recognized in datapaths - updated > -------------------------------------------------------------- > > Key: LPP-4401 > URL: > http://www.openlaszlo.org/jira/browse/LPP-4401 > Project: OpenLaszlo > Issue Type: Bug > Components: LFC - Data > Affects Versions: 3.4.2, 4.0.3, 4.0.2 > Environment: Macintosh referencing a yahoo rss data feed. > Reporter: Chris Helgeson > Assigned To: Henry Minsky > Priority: P1 > Fix For: Legals > > > When using a data source that uses namespace ":" separators in the tags, it > is not possible to write an xpath expression that will bind to the element. > It seems that the colon is not recognized. > UPDATE: 8/6/07: Further research shows that the : separators for namespaces > are stripped in the DOM representation of the XML file for SWF & DHTML when > the XML is inline, but are not stripped in the DHTML version when loaded via > HTML. The XPATH query works with : when the XML DOM keeps the :. > To Reproduce: NOTE that in this example the namespace is stripped regardless > of swf vs. DHTML > <canvas debug="true"> > <dataset name="dset"> > <rss version="2.0" > xmlns:yweather="http://xml.weather.yahoo.com/ns/rss/1.0"> > <channel> > <yweather:units temperature="F" distance="mi" pressure="in" > speed="mph" /> > </channel> > </rss> > </dataset> > > <simplelayout axis="y"/> > > <view id="myview" datapath="dset:/rss/channel/"> > <simplelayout axis="y"/> > <view datapath="units"> > <simplelayout axis="x"/> > <text datapath="@temperature"/> > <text datapath="@distance"/> > <text datapath="@pressure"/> > <text datapath="@speed"/> > </view> > </view> > </canvas> > To Reproduce: NOTE that in this example the namespace is stripped in swf vs. > not stripped in DHTML so the lzx file needs a yweather:units to work in > DHTML and needs just units for SWF... > XML file "wdata.xml": > <rss version="2.0" > xmlns:yweather="http://xml.weather.yahoo.com/ns/rss/1.0"> > <channel> > <yweather:units temperature="F" distance="mi" pressure="in" speed="mph" /> > </channel> > </rss> > LZX file: > <canvas debug="true"> > <dataset name="dset" request="true" type="http" src="wdata.xml"/> > > <simplelayout axis="y"/> > > <view id="myview" datapath="dset:/rss/channel/"> > <simplelayout axis="y"/> > <view datapath="units"> > <simplelayout axis="x"/> > <text datapath="@temperature"/> > <text datapath="@distance"/> > <text datapath="@pressure"/> > <text datapath="@speed"/> > </view> > </view> > </canvas> > > -- > This message is automatically generated by JIRA. > - > If you think it was sent incorrectly contact one of the administrators: > http://www.openlaszlo.org/jira/secure/Administrators.jspa > - > For more information on JIRA, see: > http://www.atlassian.com/software/jira > > > > -- Henry Minsky Software Architect [EMAIL PROTECTED]
