[uf-dev] parsing question

Brian Suda brian.suda at gmail.com
Thu Jan 11 07:59:40 PST 2007


On 1/11/07, Dan Connolly <connolly at w3.org> wrote:
> have you tried XSV to see what it currently does?

I have just tried and you are correct, X2V does actually extract what
is inside i tested with:

<![CDATA[
  a + b ;
]]>

the other problem with the original example is that the '<' are not
escaped so as XML xsltproc throws plenty of errors, but changing the
CDATA to just "a+b ;" does actually work.

I then tried to put the CDATA inside a script element
		<script>
		<![CDATA[ a + b ;]]>
		</script>

it still correctly extracts 'a+b ;'

Finally, to replicate the original example, i commented out the CDATA
in the script element:

		<script>
		//<![CDATA[ a + b ;]]>
		</script>

The extracted text is now "// a + b ;" with the '//'

The '//' is a comment within the script element, which has no meaning
in XML, it is just text so it is still extracted.

Is this the expected behavior? if so, X2V works :)

-brian

-- 
brian suda
http://suda.co.uk


More information about the microformats-dev mailing list