W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2012

Re: Element name replacement

From: Michael Kay <mike@saxonica.com>
Date: Fri, 12 Oct 2012 15:09:17 +0100
Message-ID: <5078248D.7080500@saxonica.com>
To: xmlschema-dev@w3.org
An XML Schema can tell you that your document is invalid, but there is 
nothing in XSD that helps you repair it when it isn't.

For HTML there are tools such as HTMLTidy that attempt to do this: see 
http://tidy.sourceforge.net

Michael Kay
Saxonica

On 12/10/2012 10:10, salma.siddiqa wrote:
> Hi,
> I am new to XSD, I went through your blog would you kindly help me.
> I want to generate an xsd which will validate an xml.
> The xml file is the html converted file and hence has html tags
> I want to validate the tag Hierarchy
> Eg: if the <p> tag has <div> tags within it then replace the <p> tag's element name as "div"
> <div id="div1">
>   <p id="p1">
>        *<**div**  id="div2">hello</**div**>*
> </p>
> </div>
>   
>   
> This should be :
> <div id="div1">
>   <p id="p1">
>        *<**p**  id="div2">hello</**p**>*
> </p>
> </div>
>   
>   
>   
>   
> I need it urgently, looking forward for your reply.
>   
> Thanks & Regards
> Salma Siddiqa
>
Received on Friday, 12 October 2012 14:09:39 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:16:02 UTC