Re: [xsl] write out xml *with* tags for data island inside xsl??

Subject: Re: [xsl] write out xml *with* tags for data island inside xsl??
From: "M. David Peterson" <m.david.x2x2x@xxxxxxxxx>
Date: Thu, 21 Apr 2005 09:39:41 -0600
FYI... for those who might be tempted to use the 'visibility' CSS
property with the value set to 'hidden' will find that while the
actual content is not being displayed the space that is being consumed
by the elements contained within this code block is still considered
by CSS to maintain this blocked out chuck of the display.  Of course
when the elements contained inside are not recognized by the HTML
processor they will be ignored and as such take up no space.  So the
only time you would realize something was wrong is that single time
that a <p> element was rendered by the HTML processor and through a
20px gap that for life of you you cant figure out what could possibly
be wrong.  The display property is actually a little different in what
it is actually causing to take place and that is setting the
contianing elements "type" when considered within the block system CSS
is built on.  A block element is something like a DIV which, if
stacked in a sibling relationship will cause them to sit on top of
each other, each represent a building block for that page.  If the
value were instead set to 'inline' then the containing element would
take on the properties of an inline element such as <strong> which
will have no effect on the strcture of as site and instead on the text
contained inside the elements strart and stop element.  By then
setting this value to 'none' you have in essence removed any and all
characteristics that would be recognized by the rendering system and
as such would not invoke a rendering processes what-so-ever.

Sorry for the drive-by tutorial but this was one of those things that
when I first began dealing with CSS cause a TON of frustration because
I hadnt taken the time to understand how the CSS 'type' system worked.
 Armed with this knowledge you of course can find and fix bugs a ton
easier than if you try to use the standard understanding of the
meanings of visibility and display as the basis for what you would
expect to happen but it isnt.

Cheers :)


On 4/21/05, M. David Peterson <m.david.x2x2x@xxxxxxxxx> wrote:
> The hack that willl allow xml data islands to work in both IE and
> Mozilla is to add a style attribute to the xml element with the
> display set to "none"...
> so:
> <xml id="dataisland" style="display:none">
> ....
> </xml>
> coupled with:
> document.getElementById('dataisland').innerHTML
> will give you a copy of everything contained within the start and end
> xml element.
> Cheers :)
> <M:D/>
> On 4/21/05, Emmanouil Batsis <Emmanouil.Batsis@xxxxxxxxxxx> wrote:
> > Eric van der Vlist wrote:
> >
> > >Replacing <xml> by <_xml> would thus be more kosher...
> > >
> > >
> >
> > It's an MS thing AFAIK, called "data islands". I dont thing they work
> > without xml being the element name :-/
> >
> > I have also recommended changing names starting with XML only to find
> > out that the spec does not actually require it.
> >
> > Manos
> >
> >
> --
> <M:D/>
> :: M. David Peterson ::
> XML & XML Transformations, C#, .NET, and Functional Languages Specialist


:: M. David Peterson ::
XML & XML Transformations, C#, .NET, and Functional Languages Specialist

Current Thread