Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 11-22-2005, 09:13 AM   #1
Senior Member
Registered: Mar 2004
Location: england
Distribution: Debian, Mint, Puppy, Raspbian
Posts: 3,421

Rep: Reputation: 200Reputation: 200Reputation: 200
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" />


<element attribute="blah"></element>
Old 11-22-2005, 03:48 PM   #2
Senior Member
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539

Rep: Reputation: 60
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)
<product id="34" />
doesnt supply CDATA.. only the attributes

<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
Old 11-23-2005, 03:38 AM   #3
Senior Member
Registered: Mar 2004
Location: england
Distribution: Debian, Mint, Puppy, Raspbian
Posts: 3,421

Original Poster
Rep: Reputation: 200Reputation: 200Reputation: 200
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Xml Parsing Eror:syntax error Black.UCoD Linux - Newbie 6 08-30-2005 05:23 PM
Apache/PHP problems with Selinux enforcing.... maxie_fc3 Fedora 0 01-11-2005 08:40 AM
Parsing XML tags with php, can't get attributes of a tag jimieee Programming 1 05-05-2004 11:32 AM
Installing xslt pk21 Linux - Software 0 09-15-2003 11:02 AM
ePlease help-> XML, XSLT James Clarkes XT software Al Bundy Linux - Software 0 04-21-2003 07:49 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:07 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration