...

View Full Version : Random XML in the document....



JAVAEOC
04-24-2004, 09:28 PM
Can i just randomly define a new tag in my document, which i associate a css to, even if the rest of my document is in XHTML....?

thanks

mpjbrennan
04-25-2004, 12:18 AM
I think the answer is that if your document has an XHTML DOCTYPE then it is restricted to the tags and attributes which are defined in the HTML 4.01 specification.

patrick

brothercake
04-25-2004, 04:54 AM
You can do it if you define your elements and attributes in addition to the XHTML DTD, although there are practical issues with that - http://www.codingforums.com/showthread.php?t=11384

But stupid-IE problems aside, yeah of course you can - that's what the "X" in "XHTML" is all about :)

me'
04-25-2004, 10:12 AM
You don't need to change the DTD:
<mymarkup:rootel xmlns:mymarkup="http://any.uri.will.do.here/">
<mymarkup:childel />
<mymarkup:childel />
</mymarkup:rootel>You can then apply some CSS:
@namespace mymarkup "http://any.uri.will.do.here/";

rootel { border: 1px solid blue }
childel::after { content "hey there!" }
/*if you've used @namespace to declare a namespace, you can then do this:*/
mymarkup|rootel { /* rules */ }

JAVAEOC
04-25-2004, 03:37 PM
Thanks alot, LOL, im not really that much into xml yet, I hardly know what it is yet.... But thanks, all I was refering to is add a random tag like:

<DoesThisWork>Hello</DoesThisWork>

and then format it in css:

DoesThisWork{
font-size: 44px;
}

thanks again..



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum