Peter Taylor's WebLog

Anyone else using xml as a markup language?

I'd like to do an informal survey - how many of you out there are using xml as markup? There is a great deal of discussion of using xml to represent data but very little discussion of using xml as markup. I guess that's because HTML and XHTML exist already.

So, anyone else out there design an xml schema to be used as markup?

Published Wednesday, May 12, 2004 11:43 AM by PeterTaylor

Comments

 

Jerry Pisk said:

I don't use it because the best browser in the world can't handle it (think CDATA sections and MIME types).
May 12, 2004 11:49 AM
 

dj said:

> So, anyone else out there design an xml schema to be used as markup?

but why? isn't xhtml a xml schema?
May 12, 2004 12:07 PM
 

ksuh said:

xhtml _is_ xml - it's an xml schema.

I've used FOP to create PDFs. Absolutely lovely.
May 12, 2004 12:11 PM
 

Peter Taylor said:

I'm talking here about designing a markup schema to encompass business logic. For example:

<root>
<warning>DON'T DO THAT!</warning>
</root>

Which might transform to:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>WARNING</title>
</head>
<body>
<H1>WARNING</H1>
<p>DON'T DO THAT</p>
</body>
</html>

The idea being that the user of the schema has a limited set of "markup" elements - in this case <warning> - to produce a specific, regular output.
May 12, 2004 12:14 PM
 

Dylan Greene said:

Yes.

HTML, XHTML, XAML, XUL, and all the others out there don't do anything to help developers conform to design guidelines. Give them the ability to change the font and they will.
May 12, 2004 12:19 PM
 

Tim said:

I can see it used in combination with xslt, there was sometalk before about totally droping html and use xml to offer more relevant searches etc. wonder what happend
May 12, 2004 1:38 PM
 

Sean said:


I don't know if this is classified as 'markup' but here goes..

The web based Metrics tracking app I just created uses a schema to define the format and presentation of tracked metrics.

One of the requirements was that ifn a new project came on where metrics needed to be tracked, this would need to be done quickly, and without need of changing DB tables and whatnot..

Using a web based administration tool, users can add additional metrics areas to store and also specify how the metric is displayed on the input page.. the backing store is Oracle .. basically two tables, with clobs for storage of XML...

so for instance, if a tracking area was required for # of errors I have something like this:

<MetricsTrackingDefinition>
<MetricDefinition name="errors" dataType="integer" nullable="false"/>
<ViewDescription title="Number of Errors">
<TextBox width=150>
</ViewDescription>
</MetricsTrackingDefinition>

I have a schema which defines the possible values, and ran XSD.exe on it to generate C# classes... At runtime the definition document is pulled from the store and deserialized into some business objects which are used to dynamically generate the input page.. in this case.. the generated page will consist of a label "Number of Errors", a textbox with a width of 150 and a validator which validates that the input is indeed an integer and not null..

It's really nice being able to do this in a declarative sort of way... Kind of a poor man's stripped down version of XAML ;)

a more encompassing method might be to extend XML schema, but this was quick and easy.. 2 days for a working app..

another bad part is the use of the "vertical table" ... dynamic table building just seems "wrong"... is this just me?
May 12, 2004 10:01 PM
 

Luke Stevens said:

Check out http://www.ccel.org/ where ThML markup is used. Granted, when your markup needs overlap with XHTML, it is natural to keep consistent if only for familiarity. In this case the markup includes quite a bit that is not XHTML, with some XSLT that will generate XHTML and some other XSLT that will generate PDF.
May 13, 2004 10:45 AM
 

Anyone else using xml as a markup language? said:

November 26, 2007 4:13 PM
Anonymous comments are disabled

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker