C # XSLT conversion doesn't work if schema is included in XML file?

We have an odd problem, we are translating a rather complex XML file using several XSLT files, this is not a problem.

The problem is that if the XML file is attached to the schema, the conversion does not work, if we delete the schema declaration, it will start working fine.

Any clues what is the problem?

Below is a schematic merge scheme

<xs:schema id="play"
targetNamespace="highway"
elementFormDefault="qualified"
xmlns="highway"
xmlns:mstns="highway"
xmlns:xs="http://www.w3.org/2001/XMLSchema">

And we just use the following code to link it (Visual Studio Intellisense then enters)

<helloElement name="hello" xmlns="highway">

I appreciate that this is not so much, but I’m not sure what to offer in terms of symptoms, let me know if you need information.

Many thanks!

+3
source share
2 answers

, xmlns="highway", (,

).
<xsl:stylesheet
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:hw="highway"
  version="1.0">

  <xsl:template match="hw:helloElement">
    ...
  </xsl:template>

</xsl:stylesheet>

.., , , .

+5

, XML- (xmlns="highway"), . XPATH XSLT, <someElement>, <highway:someElement>. . .

+2

Source: https://habr.com/ru/post/1783859/


All Articles