xforms-output and namespace

View: New views
2 Messages — Rating Filter:   Alert me  

xforms-output and namespace

by dr.cw.ray :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have an xhtml/xforms document with the following namespace that
defines the whole document:
<h:html  xmlns:h="http://www.w3.org/1999/xhtml" ...

I have an xf:output element with mediatype application/xhtml+xml.  I
noticed that the xforms-output element renders html tags like normal
even if they aren't defined by the namespace. In my form,  for example
the <h:em>thingy</h:em> and <em>thingy</em> will render identically.

I'm wondering that if any element has no prefix when there's no
declared namespace as such,  is the default automatically html?
That's fine if it is, probably a good thing. But for my design (as I'm
designing tags to be inserted into my output element) I need to know
if that is the expected behaviour and will be supported in the future,
or is it a bug or a standard that will be deprecated.

<?xml version="1.0"?>
<h:html
   xmlns:h="http://www.w3.org/1999/xhtml"
   xmlns:xf="http://www.w3.org/2002/xforms"
   xmlns:ev="http://www.w3.org/2001/xml-events">
   <h:head>
      <h:title>Insert BB code</h:title>

         <h:style type="text/css">
         @namespace h url('http://www.w3.org/1999/xhtml');
         h|fieldset {width:30em;height:25ex;
         </h:style>
         <h:style type="text/css">
         @namespace xf url('http://www.w3.org/2002/xforms');
         xf|textarea .xf-value { width:25em; height:20ex; }
         </h:style>

      <xf:model>
         <xf:instance>
               <data xmlns="">
                  <text><h:strong>  Four score and seven years
ago,</h:strong> our fathers brought forth on this continent, a
new nation,<strong> conceived in Liberty </strong>, and
dedicated to the proposition that all men are created equal </text>
                  <atEnd>1</atEnd>
               </data>
         </xf:instance>
      </xf:model>
</h:head>


<h:body>
      <xf:textarea id="textArea" incremental="true" ref="//text">
         <xf:label/>
      </xf:textarea>
<h:br/>

<h:p/>
Here is the output:
<h:fieldset class="zz" >

<xf:output class="zz" ref="//text" mediatype="application/xhtml+xml"/>

</h:fieldset>
</h:body>
</h:html>
_______________________________________________
dev-tech-xforms mailing list
dev-tech-xforms@...
https://lists.mozilla.org/listinfo/dev-tech-xforms

Re: xforms-output and namespace

by dr.cw.ray :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Jun 18, 9:44 pm, dr.cw....@... wrote:

> I have an xhtml/xforms document with the following namespace that
> defines the whole document:
> <h:html  xmlns:h="http://www.w3.org/1999/xhtml" ...
>
> I have an xf:output element with mediatype application/xhtml+xml.  I
> noticed that the xforms-output element renders html tags like normal
> even if they aren't defined by the namespace. In my form,  for example
> the <h:em>thingy</h:em> and <em>thingy</em> will render identically.
>
> I'm wondering that if any element has no prefix when there's no
> declared namespace as such,  is the default automatically html?
> That's fine if it is, probably a good thing. But for my design (as I'm
> designing tags to be inserted into my output element) I need to know
> if that is the expected behaviour and will be supported in the future,
> or is it a bug or a standard that will be deprecated.
>
> <?xml version="1.0"?>
> <h:html
>    xmlns:h="http://www.w3.org/1999/xhtml"
>    xmlns:xf="http://www.w3.org/2002/xforms"
>    xmlns:ev="http://www.w3.org/2001/xml-events">
>    <h:head>
>       <h:title>Insert BB code</h:title>
>
>          <h:style type="text/css">
>          @namespace h url('http://www.w3.org/1999/xhtml');
>          h|fieldset {width:30em;height:25ex;
>          </h:style>
>          <h:style type="text/css">
>          @namespace xf url('http://www.w3.org/2002/xforms');
>          xf|textarea .xf-value { width:25em; height:20ex; }
>          </h:style>
>
>       <xf:model>
>          <xf:instance>
>                <data xmlns="">
>                   <text><h:strong>  Four score and seven years
> ago,</h:strong> our fathers brought forth on this continent, a
> new nation,<strong> conceived in Liberty </strong>, and
> dedicated to the proposition that all men are created equal </text>
>                   <atEnd>1</atEnd>
>                </data>
>          </xf:instance>
>       </xf:model>
> </h:head>
>
> <h:body>
>       <xf:textarea id="textArea" incremental="true" ref="//text">
>          <xf:label/>
>       </xf:textarea>
> <h:br/>
>
> <h:p/>
> Here is the output:
> <h:fieldset class="zz" >
>
> <xf:output class="zz" ref="//text" mediatype="application/xhtml+xml"/>
>
> </h:fieldset>
> </h:body>
> </h:html>

A default namespace declaration applies to all unprefixed element
names within its scope.
_______________________________________________
dev-tech-xforms mailing list
dev-tech-xforms@...
https://lists.mozilla.org/listinfo/dev-tech-xforms
LightInTheBox - Buy quality products at wholesale price!