You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Randall Svancara <rs...@adaweb.net> on 2005/04/28 22:11:15 UTC

DTD xhtml 1.0 Strict

I am wondering if <html:text> can be altered to generate valid DTD xhtml
1.0 strict xhtml.

For example, I have:

<html:text property="search" size="20"/>

which generates:

<input type="text" name="search" size="20" value="">

For valid xhtml 1.0 strict dtd, it needs to look like this:

<input type="text" name="search" size="20" value=""/>

Any ideas, suggestions or comments.

Thanks in advance.

Randall

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: DTD xhtml 1.0 Strict

Posted by Michael Jouravlev <jm...@gmail.com>.
google: struts xhtml

The first line of search result:
"Kickstart FAQ - Apache Struts: Are the Struts tags XHTML compliant?"
http://struts.apache.org/faqs/kickstart.html#xhtml:
  If you use an <html:html xhtml="true> or <html:xhtml/> element 
  on your page, the tags will render as XHTML (since Struts 1.1).

Also from BaseHandlerTag.java:

    /**
     * Returns the closing brace for an input element depending on
xhtml status.  The tag
     * must be nested within an %lt;html:html&gt; tag that has xhtml
set to true.
     * @return String - &gt; if xhtml is false, /&gt; if xhtml is true
     * @since Struts 1.1
     */
    protected String getElementClose() {
        if (this.isXhtml()) {
            return " />";
        } else {
            return ">";
        }
    }

On 4/28/05, Randall Svancara <rs...@adaweb.net> wrote:
> I am wondering if <html:text> can be altered to generate valid DTD xhtml
> 1.0 strict xhtml.
> 
> For example, I have:
> 
> <html:text property="search" size="20"/>
> 
> which generates:
> 
> <input type="text" name="search" size="20" value="">
> 
> For valid xhtml 1.0 strict dtd, it needs to look like this:
> 
> <input type="text" name="search" size="20" value=""/>
> 
> Any ideas, suggestions or comments.
> 
> Thanks in advance.
> 
> Randall

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org