Jump to content

MichalAugustyniak

Members
  • Posts

    5
  • Joined

  • Last visited

MichalAugustyniak's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. I don't know that far. I looked at the w3schools tutorial really quick and that's what I got is that they plaster the xmlns or "default namespace" in the xml, xsl and xsd files. Another thing is that if I scrap the xmlns from the xml file, I can write anything I want in the schema file and it will be like the schema file never mattered.I looked through that tutorial again and it basically has xmlns="http://www.w3schools.com" as the default namespace in both the xml and schema file. What I don't get is why it blocks the xsl file from formatting the content. The second I remove the default namespace from the xml file, everything formats properly, but the schema file becomes irrelevant..There's definitely a default namespace conflict here. It might be due to the fact tht xml considers all non<xsl:> tagsto be of default namespace, and the xsd's non-<xs:> tags are too. The the xml file itelf also has it s default namespace set to the same value and it impleements the xsd file with the same-valued default namespace. I guess there's a conflict over who gets the default nespace.BAsically, I want the xml file to comply with the schema, and get formatted by the xsl file. That's what I'm looking for.
  2. That's the thing, what kind of extension do I need on the xmlns namespace?Thansk for the reply though.
  3. I need the db, could someone tell me where I can find it on the site?
  4. Hi. I've got a tiny little database, it could be anything, I'm just testing right now. It displays with my xsl all fine, until I add my root namespace value:XSL <?xml version = "1.0" ?><xsl:stylesheet version = "1.0" xmlns="http://www.mine.com" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="/"> XSD <xs:schema xmlns="http://www.mine.com" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="Container_Namespace" elementFormDefault="qualified"> XML <?xml version="1.0" encoding="ISO-8859-1" ?><?xml-stylesheet type="text/xsl" href="db_ss.xsl"?><database xmlns="http://www.mine.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mine.com Container_Namespace%20molecular_db_schema.xsd"> Everything appears fine UNTIL I add the root namespace for the root node: xmlns="http://www.mine.com"Remove it, to get this <?xml version="1.0" encoding="ISO-8859-1" ?><?xml-stylesheet type="text/xsl" href="db_ss.xsl"?><database xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mine.com Container_Namespace%20molecular_db_schema.xsd"> And all seems to look good, but it's like the schema is irrelevant. I can write anything in the schema or in the xml file and it displays only what's defined in the xsl. How do you fix this?Thanks in advance...MikePS: I did take the XML tutorial, it seems to me as though I've placed the namespaces where they were supposed to be. Could someone help me out with this one?
×
×
  • Create New...