LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 11-22-2005, 08:13 AM   #1
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: FreeBSD, Debian, Mint, Puppy
Posts: 3,288

Rep: Reputation: 174Reputation: 174
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>
 
Old 11-22-2005, 02:48 PM   #2
nadroj
Senior Member
 
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539

Rep: Reputation: 59
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
 
Old 11-23-2005, 02:38 AM   #3
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: FreeBSD, Debian, Mint, Puppy
Posts: 3,288

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


Reply


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 04:23 PM
Apache/PHP problems with Selinux enforcing.... maxie_fc3 Fedora 0 01-11-2005 07:40 AM
Parsing XML tags with php, can't get attributes of a tag jimieee Programming 1 05-05-2004 10:32 AM
Installing xslt pk21 Linux - Software 0 09-15-2003 10:02 AM
ePlease help-> XML, XSLT James Clarkes XT software Al Bundy Linux - Software 0 04-21-2003 06:49 AM


All times are GMT -5. The time now is 09:16 PM.

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