XSLT/xml enforcing full tag syntax
Hello there,
does anyone know if in XSL you can coerce abbreviated tag closures to the long form. e.g: so that... <element attribute="blah" /> becomes: <element attribute="blah"></element> |
when using a DTD i believe you can have an element required.
could this be solved with an if/else-like statement? you can use <xsl:when>... elements to test whether the data was given or not. what you are trying to do is to require that the element contains data (not just attributes) ie <product id="34" /> doesnt supply CDATA.. only the attributes while <product id="34">Cheese</product> gives data to the element, along with an attribute. (dunno where i was going with this, sorry lol) i think maybe using a DTD making the element of type DATA and #REQUIRED. my thoughts |
no actually, I am trying to process in perl.
I have > 600 big XML files. > 7 million lines. Using saxon Xquery it is is veryslow even to extract a simple query. Plus it uses about 20MegaGigaBugga bytes for each file. So i am trying a perl method, which is much quicker. And it would just be easier if all tags were closed off properly. |
All times are GMT -5. The time now is 10:50 PM. |