[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

value of NDATA Entities in attributes

Subject: value of NDATA Entities in attributes
From: James Cummings <James.Cummings@xxxxxxxxx>
Date: Mon, 11 Aug 2003 16:27:09 +0100 (BST)
ndata
Hi there,

Although this is probably a sick way of doing things,
I have some documents where there is an xptr element
whose attribute href is declared in the DTD as:
<!ATTLIST xptr href ENTITY #REQUIRED>

The entities for these are created as:
<!NOTATION FOO SYSTEM 'text/xml'>
<!ENTITY Blort SYSTEM 'Blortfile.xml' NDATA FOO>
<!ENTITY Wibble SYSTEM 'Wibblefile.xml' NDATA FOO>
(etc.)

Although a little warped this does certainly make sure
that things are given as <xptr href="Blort" other="attrib" />
if blort is used instead, it does not validate.

The question is, since the Blort entity is declared as
NDATA, is it possible to retrieve the string 'Blortfile.xml'.

On the surface you'd think something like:
<xsl:template match="xptr">
<xsl:value-of select="@href"/>
</xsl:template>

when matching <xptr href="Blort" other="attrib" />
would output 'Blortfile.xml'.  However (probably
quite sensibly) it instead outputs 'Blort'.

Assuming that I cannot change the XML, is there
a fairly straightforward change I could make to
the DTD / Entities that would keep the
validation requirement ('Blort' not 'blort') but
return the string 'Blortfile.xml' in the XSL.  Or
is there a way in the XSL to get this that I'm
missing entirely?

I just keep coming up with silly questions like this
don't I?

-James
-- 
Dr James Cummings, James.Cummings@xxxxxxxxx, http://www.uea.ac.uk/~q503
Cursus Project, School of Music, University of East Anglia,
Norwich, Norfolk, NR4 7TJ, UK  Tel:(01603)593-595



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.