xpath-default-namespace getting in the way
Posted: Sat Oct 23, 2010 6:19 pm
I am taking over a project that has some existing stylesheets.
One of them has this at the top
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.tei-c.org/ns/1.0"
xpath-default-namespace="http://www.tei-c.org/ns/1.0"
xmlns:ta="http://concord-works.com/tei/augment-functions" exclude-result-prefixes="xs ta" version="2.0">
The sheet works fine processing the existing tei documents.
My problem with it is that I now need to use two source documents accessing the second with the doc() command. This works fine except that I can't access anything in the document. The document is just data contained in plain xml, no dtd, not tei, etc.. If I remove the xpath-default-namespace line from above I can access the data in the second document, but then many of the templates are not recognized during processing because the match="name" doesn't have tei: prepended to them.
My question: Is there a way I can fix this without going through the entire style sheet and finding which match"names" need to have tei: added?
thanks,
Scott
One of them has this at the top
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.tei-c.org/ns/1.0"
xpath-default-namespace="http://www.tei-c.org/ns/1.0"
xmlns:ta="http://concord-works.com/tei/augment-functions" exclude-result-prefixes="xs ta" version="2.0">
The sheet works fine processing the existing tei documents.
My problem with it is that I now need to use two source documents accessing the second with the doc() command. This works fine except that I can't access anything in the document. The document is just data contained in plain xml, no dtd, not tei, etc.. If I remove the xpath-default-namespace line from above I can access the data in the second document, but then many of the templates are not recognized during processing because the match="name" doesn't have tei: prepended to them.
My question: Is there a way I can fix this without going through the entire style sheet and finding which match"names" need to have tei: added?
thanks,
Scott