I want to translate an almost-XHTML document to standard XHTML
Almost-XHTML: This will be a document that is XHTML, except that it will have my own custom controls (elements) in addition to html.
Of course my problem is not knowing how to do this.
[COLOR=white black]Before:[/color]
[COLOR=white black]After:[/color]
Almost-XHTML: This will be a document that is XHTML, except that it will have my own custom controls (elements) in addition to html.
Of course my problem is not knowing how to do this.
[COLOR=white black]Before:[/color]
Code:
<?xml [navy]version[/navy]=[green]"1.0"[/green] [navy]encoding[/navy]=[green]"UTF-8"[/green]?>
<?xml-stylesheet [navy]type[/navy]=[green]"text/xsl"[/green] [navy]href[/navy]=[green]"NeedATranslator.xsl"[/green] ?>
[gray]<!--
This is the document in need of translation.
I want to retain the entire document with the exception
of my custom controls in which I wish to translate.
-->[/gray]
<[b]html[/b] [navy]xmlns:My[/navy]=[green]"[URL unfurl="true"]http://www.Nowhere.com/My"[/URL][/green]>
<[b]head[/b]>
<[b]title[/b]>A title</[b]title[/b]>
</[b]head[/b]>
<[b]body[/b]>
[gray]<!-- here is my custom control (element) -->[/gray]
<[b]My:DataTable[/b] [navy]DatabaseName[/navy]=[green]"Northwind"[/green] [navy]Sql[/navy]=[green]"SELECT * FROM Customers"[/green]>
</[b]My:DataTable[/b]>
<[b]p[/b]>Hello world</[b]p[/b]>
</[b]body[/b]>
</[b]html[/b]>
[COLOR=white black]After:[/color]
Code:
<?xml [navy]version[/navy]=[green]"1.0"[/green] [navy]encoding[/navy]=[green]"UTF-8"[/green]?>
[gray]<!--
This is the XHTML document I want it to look like after translation.
-->[/gray]
<[b]html[/b]>
<[b]head[/b]>
<[b]title[/b]>A title</[b]title[/b]>
</[b]head[/b]>
<[b]body[/b]>
[gray]<!-- here is my custom control translated to a table (in this instance) -->[/gray]
<[b]table[/b]>
<[b]tr[/b]>
<[b]th[/b]>Firstname</[b]th[/b]>
<[b]th[/b]>LastName</[b]th[/b]>
<[b]th[/b]>Blah blah blah</[b]th[/b]>
</[b]tr[/b]>
<[b]tr[/b]>
<[b]td[/b]>Joe</[b]td[/b]>
<[b]td[/b]>Smith</[b]td[/b]>
<[b]td[/b]>Blah blah blah</[b]td[/b]>
</[b]tr[/b]>
</[b]table[/b]>
[gray]<!-- All other html is retained exactly as it were -->[/gray]
<[b]p[/b]>Hello world</[b]p[/b]>
</[b]body[/b]>
</[b]html[/b]>