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

RE: Namespaces and XML -Resolved

Subject: RE: Namespaces and XML -Resolved
From: "Nice, Kerry A. (LNG-SHEP)" <Kerry.Nice@xxxxxxxxxxxx>
Date: Thu, 19 Apr 2001 16:40:10 -0600
resolved call template
Ok, another stupid mistake.  I figured it out.  I guessed what I was
supposed to put for the namespace declaration and I guessed way wrong.  I
didn't realize I needed to actually put some bogus useless address in there
instead of a real thing.  So, I changed:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:lnv="COURTCASE-V01.dtd" version="1.0">
to:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:lnv="http://www.lexis-nexis.com/lnv"  version="1.0">
and now everything is happy.

Thanks,
Kerry.

-----Original Message-----
From: Nice, Kerry A. (LNG-SHEP) [mailto:Kerry.Nice@xxxxxxxxxxxx]
Sent: Thursday, April 19, 2001 1:27 PM
To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
Subject: RE:  Namespaces and XML


Ok, stupid mistake, but I need the template-match's to work.  And there is
something else going on.  If I use the call-template and change the xsl to
(and have a lnv:CITE in my XML):

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:lnv="COURTCASE-V01.dtd" version="1.0">
<xsl:output method="text"/>
<xsl:template match="/">
{
<xsl:call-template name="lnv:COURTCASE"/>
<!--  <xsl:apply-templates/>  -->
}
</xsl:template>

<xsl:template match="lnv:COURTCASE">
\par LNI='<xsl:value-of select="/lnv:COURTCASE/@lni"/>' SRC='<xsl:value-of
select="/lnv:COURTCASE/@src"/>' 
<xsl:apply-templates/>
</xsl:template>

<xsl:template match="lnv:CITE">
{\ul\cf9<xsl:value-of select="/lnv:COURTCASE/lnv:CITE/>\par }
</xsl:template>


</xsl:stylesheet>

My output is:
\par <LNI='' SRC=''>

It never goes to the lnv:CITE rules and none of the lnv:COURTCASE attributes
are picked up.  Like I said, all the XSL worked when I stripped the lnv:'s
out of the XSL and XML.

Thanks,
Kerry.


-----Original Message-----
From: sara.mitchell@xxxxxxxxx [mailto:sara.mitchell@xxxxxxxxx]
Sent: Thursday, April 19, 2001 1:06 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE:  Namespaces and XML


Yes, it's something very basic. You have:

<xsl:call-template name="lnv:COURTCASE"/>

which means that the processor then looks for a 
template like this:

<xsl:template match="lnv:COURTCASE">
...
</xsl:template> 

But in your stylesheet, what you actually  have is 

<xsl:template match="lnv:COURTCASE">
...
</xsl:template> 

You either need to make 'match' be 'name' or you 
need to change the <xsl:call-template ...> to be
<xsl:apply-templates select="lnv:COURTCASE"/>. 

Sara
> -----Original Message-----
> From: Nice, Kerry A. (LNG-SHEP) [mailto:Kerry.Nice@xxxxxxxxxxxx]
> Sent: Thursday, April 19, 2001 11:29 AM
> To: 'XSL-List@xxxxxxxxxxxxxxxxxxxxxx'
> Subject:  Namespaces and XML
> 
> 
> Hi,
> I'm really confused now.  I have an xml document something like:
> 
> <?xml version="1.0" encoding="utf-8"?>
> <!DOCTYPE lnv:COURTCASE PUBLIC "-//LEXIS Publishing//DTD 
> COURT CASE STRICT
> 1.000//EN" "COURTCASE-V01.dtd">
> <lnv:COURTCASE  cdi="11E200006B6700010008"
> lni="3WY3-VH40-0039-403H-00000-00" src="11E2" > 
> </lnv:COURTCASE>
> 
> The lnv: is all defined in the DTD which I have nothing to do 
> with and can't
> really change anyways.  But how do I get XSL to work with it.  
> 
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:lnv="COURTCASE-V01.dtd" version="1.0">
> <xsl:output method="text"/>
> <xsl:template match="/">
> {
> <xsl:call-template name="lnv:COURTCASE"/>
> <!--  <xsl:apply-templates/>  -->
> }
> </xsl:template>
> 
> <xsl:template match="lnv:COURTCASE">
> Mmmbop
> </xsl:template>
> 
> </xsl:stylesheet>
> 
> If I try this XSL, which works if I strip off all the 
> namespaces in the XSL
> and XML and just make everything COURTCASE instead of 
> lnv:COURTCASE, I get
> two possible errors, or at least results that I don't want.  
> If I use the
> template-match, it never finds the lnv:COURTCASE template.  If I use
> call-template, I get "XSL Error: Could not find template named:
> COURTCASE-V01.dtd:COURTCASE".
> 
> Am I missing something really basic here?
> 
> Thanks,
> Kerry.
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 

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

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

 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.