Subject: Re: [xsl] Validation XSLT using XSLT 1.0 From: Abel Braaksma <abel.online@xxxxxxxxx> Date: Thu, 03 Jul 2008 07:34:31 +0200 |
Dear All,
I am writing a validation style sheet. I am struck at following point in my validation. Can anyone point me to solution.
1. I want to validate the @picfile value is equal to entity name and tiff images must be equal to the actual images file name on the image folder.
My question is how to get entity name and value in to a test.
<!ENTITY I9780073379470_A_TB004 SYSTEM "9780073379470_A_TB004.tif" NDATA TIFF>
<graphic picfile="I9780073379470_A_TB004"/>
2. In the XML file we are using named entities eg:- ´
instead of { or ģ in XSLT how to find if the XML file
contains entities other than named entities?
3. How to find non-ascii characters in the XML file and report an
error using XSLT.
<xsl:template match="text()[string-to-codepoints(.)[. gt 127]]"> <xsl:message terminate="yes" >Not Ascii!!</xsl:message> </xsl:template>
4. How to find double enters in the XML file and report an error using XSLT.
<xsl:template match="text()[contains(., '

')]"> <xsl:message terminate="yes">double 'enter'</xsl:message> </xsl:template>
I could able to write around 45 validation points using XSLT but got
struck with these 4. Please help me resolving these issues.
HTH, Cheers, -- Abel --
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Validation XSLT using XSLT 1., Ganesh Babu N | Thread | Re: [xsl] Validation XSLT using XSL, Michael Ludwig |
[xsl] Validation XSLT using XSLT 1., Ganesh Babu N | Date | [xsl] Comparing before and after r, Enrico . Raymund |
Month |