I am writing a Page with XML Only. No XSL is being.
everything is going well with XML and CSS.
But how can I make Input fields with XML and CSS Only ??
is it really possible ??
I am writing a Page with XML Only. No XSL is being. everything is
Share
Xml is for data transformation, porting, trasportation, etc – things related to data.
CSS is for styling.
You will need something for instance, html(or XForms?), to provide/render controls.
Or probably, if you plan to render the control yourself, then you can, for instance, add an element, and render the control by parsing it yourself.
When you see MyControl having a Text type then add a Text control.
–EDIT–
This is in response to your comment.
I understand what you are saying; to be clear, I believe CSS by nature/actually is for styling – therefore CSS is applied “on” the controls, CSS aren’t the controls; so we come up with certain classes, ids, selectors and apply them over the controls.
This may be, yet again, a fat example, but its like telling a “Paint” to build a “House”.
Probably you already know this, but this is just to add: Following is how CSS is applied to a html button control.
Example taken from here:
The above code is going to render a button with css applied like following:
alt text http://img689.imageshack.us/img689/4615/72060104.jpg
So to answer your question directly, I believe it is not possible to render a control with CSS.
Now based upon your requirements, I understand that:
1. You want to render the control yourself.
2. You want to apply CSS to that control.
Solution 1:
1. Add, parse and render your custom control xml tags, as discussed earlier.
2. And add the CSS style within xml, see example
Solution 2:
1. Add, parse and render your custom control xml tags, as discussed earlier.
2. Add css in xml
CDATA; while xml parse, grab the CSS from CDATA, and apply to the control.