Subject: RE: Templates aplied to namespaces From: "Chris Bayes" <Chris@xxxxxxxxxxx> Date: Tue, 21 Dec 1999 19:37:49 -0000 |
I thought I had namespaces sorted out in my head until this weekend when I tried to work with the xhtml output from tidy. What I did work out was that <ROOTELEMENT xmlns="http://www.somewhere.com/mynamespace"> doesn't get you the default namespace so nothing matches. <ROOTELEMENT xmlns:="http://www.somewhere.com/mynamespace"> will get the default namespace. But could i get tidy to output that.... I also found that the dtd specified by tidy doesn't exist at w3 but that is a different story. ciao Chris >-----Original Message----- >From: owner-xsl-list@xxxxxxxxxxxxxxxx >[mailto:owner-xsl-list@xxxxxxxxxxxxxxxx]On Behalf Of Elliotte Rusty >Harold >Sent: 19 December 1999 22:34 >To: xsl-list >Subject: Templates aplied to namespaces > > >I have an input document that looks like this: > ><?xml version="1.0" encoding="UTF-8" ?> ><ROOTELEMENT xmlns="http://www.somewhere.com/mynamespace"> > <ERRORCODE>0</ERRORCODE> > <BOOKLIST> > <BOOK> > <title>Three Men in a Boat: To Say Nothing of the Dog!</title> > <isbn>0140012133</isbn> > </BOOK> > <BOOK> > <title>Catch-22</title> > <isbn>0684833395</isbn> > </BOOK> > </BOOKLIST> ></ROOTELEMENT> > >The particular issue is that it uses the default namespace on its >elements but no prefix. I'm having a devil of a time getting a template >in the XSLT stylesheet to match up with anything by its name, either >with or without a prefix. Everything works fine if I remove the >namespace declaration from the input document. However declaring the >namespace in the stylesheet, with or without a prefix, doesn't seem to >help. > >I'm using xt. Does anyone have any suggestions; for instance a template >rule that would match a title element in the above document? Thanks. > >+-----------------------+------------------------+-------------------+ >| Elliotte Rusty Harold | elharo@xxxxxxxxxxxxxxx | Writer/Programmer | >+-----------------------+------------------------+-------------------+ >| Java I/O (O'Reilly & Associates, 1999) | >| http://metalab.unc.edu/javafaq/books/javaio/ | >| http://www.amazon.com/exec/obidos/ISBN=1565924851/cafeaulaitA/ | >+----------------------------------+---------------------------------+ >| Read Cafe au Lait for Java News: http://metalab.unc.edu/javafaq/ | >| Read Cafe con Leche for XML News: http://metalab.unc.edu/xml/ | >+----------------------------------+---------------------------------+ > > > 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Templates aplied to namespaces, Mark D. Anderson | Thread | Re: Templates aplied to namespaces, David Rocher |
Re: A new Zvon tutorial and a littl, disco | Date | Attention all XSLT tutorial writers, pat jones |
Month |