xsl-list
[Top] [All Lists]

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

2005-04-21 08:39:41
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 :)

<M:D/>

On 4/21/05, M. David Peterson <m(_dot_)david(_dot_)x2x2x(_at_)gmail(_dot_)com> 
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(_dot_)Batsis(_at_)eurodyn(_dot_)com> 
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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--
<M:D/>

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



-- 
<M:D/>

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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--