HighTechTalks DotNet Forums  

XHTML and custom attributes

ASP.net Building Controls microsoft.public.dotnet.framework.aspnet.buildingcontrols


Discuss XHTML and custom attributes in the ASP.net Building Controls forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Peter Blum
 
Posts: n/a

Default XHTML and custom attributes - 02-26-2004 , 05:08 PM






I'm planning my strategy to be XHTML ready for "Whidbey". My ASP.NET
controls have a lot of client-side scripting. Sometimes I pass along custom
attributes as data for my scripts to use. Those attributes appear in the
normal HTML tag. For example:
<input type=text attr1=value1 attr2=value2 />
(I added them through the control's Attributes collection.)

1. Is it legal to add custom attributes to a known tag in an XHTML page? If
so, does the !DOCTYPE XHTML 1.0 Strict support them?

2. Predefined attributes are supposed to be lowercase names. Are my custom
attributes also supposed to be lowercase?

--- Peter Blum
www.PeterBlum.com
Email: PLBlum (AT) PeterBlum (DOT) com
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx



Reply With Quote
  #2  
Old   
AT
 
Posts: n/a

Default RE: XHTML and custom attributes - 02-27-2004 , 03:59 AM







Hi Peter,

Thank you for posting in the community!

Based on my understanding, you want to know validation about XHtml

==========================================
Actually, you can validate your xhtml through a web of W3 organization,
please refer to:
http://validator.w3.org/

XHtml will use the DTD to validate the attribute for you, so your custom
attribute will be treated as a valid attribute. So your xhtml file will not
be valid.

The html have build-in attributes collection and build-in html tag
collection, you can not extend them.

For more information, I think you should refer to:
http://www.w3.org/TR/xhtml1/#a_dtd_XHTML-1.0-Strict

Thank you for your patience and cooperation. If you have any questions or
concerns, please feel free to post it in the group. I am standing by to be
of assistance.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.


Reply With Quote
  #3  
Old   
AT
 
Posts: n/a

Default RE: XHTML and custom attributes - 03-01-2004 , 07:01 PM




Hi Peter,

Does my reply make sense to you?

If you still have any concern, please feel free to feedback, I will help
you.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.


Reply With Quote
  #4  
Old   
Alessandro Zifiglio
 
Posts: n/a

Default Re: XHTML and custom attributes - 03-02-2004 , 02:15 AM



Peter, I think you might want to change that part where you define custom
attributes. As far as XHML 1.0 strict is concerned you have to declare in
all your pages that you are using a specific doc type and all attributes and
elements are already declared in this doc type. When you specify to be using
the XHTML 1.0 strict doc type your browser automatically goes into the so
called "Strict mode". . . .

Attribute :
An attribute is a parameter to an element declared in the DTD. An
attribute's type and value range, including a possible default value, are
defined in the DTD

The above line implies that you cannot use custom attributes. An attribute
has to be declared in the DTD(Document type). "XHTML family document types
are XML based"

4.2 Element and attribute names must be in lower case
XHTML documents must use lower case for all HTML element and attribute
names. This difference is necessary because XML is case-sensitive e.g. <li>
and <LI> are different tags

For more on the differences btw HTML 4 and XHTML take a look at the
following recommendation on the w3c.

http://www.w3.org/TR/2000/REC-xhtml1-20000126/#xhtml


"""Jeffrey Tan[MSFT]""" <v-jetan (AT) online (DOT) microsoft.com> wrote

Quote:
Hi Peter,

Does my reply make sense to you?

If you still have any concern, please feel free to feedback, I will help
you.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.




Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.